README ¶ dsn := &mysql.DSN{ Host: "127.0.0.1", Port: 3306, User: "root", } db, err := mysql.Dial(dsn, time.Second) if err != nil { panic(err) } defer db.Close() Expand ▾ Collapse ▴ Documentation ¶ Index ¶ type DSN type MySQL func Dial(dsn *DSN, timeout time.Duration) (*MySQL, error) func (c *MySQL) Close() error type Result Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type DSN ¶ type DSN struct { Host string // 1.2.3.4 Port string // 3306 User string // foo Pass string // 123456 Name string // dbname Code string // utf8mb4 } type MySQL ¶ type MySQL struct { // contains filtered or unexported fields } func Dial ¶ func Dial(dsn *DSN, timeout time.Duration) (*MySQL, error) func (*MySQL) Close ¶ func (c *MySQL) Close() error type Result ¶ type Result struct { } Source Files ¶ View all Source files mysql.go result.go Click to show internal directories. Click to hide internal directories.