Nest packages under pkg
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package config
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Database struct {
|
||||
Hostname string
|
||||
Name string
|
||||
Port int
|
||||
}
|
||||
|
||||
func DbConnectionString(dbConfig Database) string {
|
||||
return fmt.Sprintf("postgresql://%s:%d/%s?sslmode=disable", dbConfig.Hostname, dbConfig.Port, dbConfig.Name)
|
||||
}
|
||||
Reference in New Issue
Block a user