From 887d418183c818d456877254ada9f52af8cd08de Mon Sep 17 00:00:00 2001 From: Pyry Kontio Date: Fri, 1 Sep 2023 15:11:49 +0900 Subject: [PATCH 1/2] Improve DNS docstsrings --- dsn.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dsn.go b/dsn.go index 380ca9570..e126bf3d1 100644 --- a/dsn.go +++ b/dsn.go @@ -36,8 +36,8 @@ var ( type Config struct { User string // Username Passwd string // Password (requires User) - Net string // Network type - Addr string // Network address (requires Net) + Net string // Network protocol + Addr string // Network address (requires Net, otherwise defaults to a local connection) DBName string // Database name Params map[string]string // Connection parameters ConnectionAttributes string // Connection Attributes, comma-delimited string of user-defined "key:value" pairs From 131d94de873311a1ebffb851306fcffe51cd4135 Mon Sep 17 00:00:00 2001 From: Pyry Kontio Date: Sat, 2 Sep 2023 03:01:44 +0900 Subject: [PATCH 2/2] Update dsn.go Co-authored-by: Inada Naoki --- dsn.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dsn.go b/dsn.go index e126bf3d1..f5b184e3f 100644 --- a/dsn.go +++ b/dsn.go @@ -36,8 +36,8 @@ var ( type Config struct { User string // Username Passwd string // Password (requires User) - Net string // Network protocol - Addr string // Network address (requires Net, otherwise defaults to a local connection) + Net string // Network (e.g. "tcp", "tcp6", "unix". default: "tcp") + Addr string // Address (default: "127.0.0.1:3306" for "tcp" and "/tmp/mysql.sock" for "unix") DBName string // Database name Params map[string]string // Connection parameters ConnectionAttributes string // Connection Attributes, comma-delimited string of user-defined "key:value" pairs