Skip to content

Instantly share code, notes, and snippets.

@oxlb
Created October 9, 2020 15:36
Show Gist options
  • Save oxlb/a2bfd46ca9cec7fa233fc70ae8894239 to your computer and use it in GitHub Desktop.
Save oxlb/a2bfd46ca9cec7fa233fc70ae8894239 to your computer and use it in GitHub Desktop.
package config
import "fmt"
const (
DBUser = "root"
DBPassword = "root"
DBName = "root"
DBHost = "0.0.0.0"
DBPort = "5432"
DBType = "postgres"
)
func GetDBType() string {
return DBType
}
func GetPostgresConnectionString() string {
dataBase := fmt.Sprintf("host=%s port=%s user=%s dbname=%s password=%s sslmode=disable",
DBHost,
DBPort,
DBUser,
DBName,
DBPassword)
return dataBase
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment