mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-29 23:16:51 +00:00
CI: Bump go version, linters and fix minor issues (#1010)
* Bump golang, golangci-lint versions and fix issues * Add -fno-stack-protector * Fix AppVeyor golangci-lint ver * Nitters * Nitters round 2
This commit is contained in:
@@ -3,6 +3,8 @@ package postgres
|
||||
import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"net"
|
||||
"strconv"
|
||||
|
||||
// import go libpq driver package
|
||||
_ "github.com/lib/pq"
|
||||
@@ -21,11 +23,11 @@ func Connect(cfg *database.Config) (*database.Instance, error) {
|
||||
cfg.SSLMode = "disable"
|
||||
}
|
||||
|
||||
configDSN := fmt.Sprintf("postgres://%s:%s@%s:%d/%s?sslmode=%s",
|
||||
host := net.JoinHostPort(cfg.Host, strconv.FormatUint(uint64(cfg.Port), 10))
|
||||
configDSN := fmt.Sprintf("postgres://%s:%s@%s/%s?sslmode=%s",
|
||||
cfg.Username,
|
||||
cfg.Password,
|
||||
cfg.Host,
|
||||
cfg.Port,
|
||||
host,
|
||||
cfg.Database,
|
||||
cfg.SSLMode)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user