---
title: "shabaz khan (@rare795) | Hashnode"
description: "shabaz khan (@rare795) writes on Hashnode. Read their latest articles and follow their work."
url: "https://hashnode.com/@rare795"
---

@rare795

# shabaz khan

@rare795 · Joined January 2024

## Comments

[getting error while applying this code \[GIN-debug\] \[WARNING\] Creating an Engine instance with the Logger and Recovery middleware already attached. \[GIN-debug\] \[WARNING\] Running in "debug" mode. Switch to "release" mode in production. using env: export GIN\_MODE=release using code: gin.SetMode(gin.ReleaseMode) 2024/01/26 15:10:24 /home/shabaz/go-auth/models/index.go:27 \[error\] failed to initialize database, got error failed to connect to host=localhost user=postgres database=test: dial error (dial tcp 127.0.0.1:5435: connect: connection refused) panic: failed to connect to host=localhost user=postgres database=test: dial error (dial tcp 127.0.0.1:5435: connect: connection refused) goroutine 1 \[running\]: go-auth/models.InitDB({{0xc000138188, 0x9}, {0xc000500c58, 0x4}, {0xc000500c18, 0x8}, {0xc0001381a4, 0x8}, {0xc000500bf8, 0x4}, ...}) /home/shabaz/go-auth/models/index.go:29 +0x32c main.main() /home/shabaz/go-auth/main.go:34 +0x21a exit status 2](https://hashnode.com/posts/how-to-implement-authentication-and-authorization-in-golang/63decbedf0bf6bdfd346f58e/comment/65b37f01cc14f49ba799a771)

Comment · Article · Jan 26, 2024 · [How to Implement Authentication and Authorization in Golang.](https://hashnode.com/posts/how-to-implement-authentication-and-authorization-in-golang/63decbedf0bf6bdfd346f58e)
