Skip to content

Commit

Permalink
Fix parse db connection from env for postgress
Browse files Browse the repository at this point in the history
  • Loading branch information
ShkrutDenis committed Mar 24, 2020
1 parent 98df78c commit 7816979
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func NewConnector() *Connector {

func NewConfig() *ConnectionConfig {
var host, port string
connectionParts := strings.Split(":", os.Getenv("DB_CONNECTION"))
connectionParts := strings.Split(os.Getenv("DB_CONNECTION"), ":")
if len(connectionParts) == 2 {
host, port = connectionParts[0], connectionParts[1]
}
Expand Down

0 comments on commit 7816979

Please sign in to comment.