MCPcopy
hub / github.com/go-sql-driver/mysql / ensureHavePort

Function ensureHavePort

dsn.go:695–700  ·  view source on GitHub ↗
(addr string)

Source from the content-addressed store, hash-verified

693}
694
695func ensureHavePort(addr string) string {
696 if _, _, err := net.SplitHostPort(addr); err != nil {
697 return net.JoinHostPort(addr, "3306")
698 }
699 return addr
700}

Callers 1

normalizeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected