摘要: Marshal func Marshal(v interface{})([]byte, error) Marshal returns the JSON encoding of v. Marshal返回v的JSON编码。 Marshal traverses the value v recursivel 阅读全文
posted @ 2020-11-16 15:23 菜鸟++ 阅读(966) 评论(1) 推荐(1) 编辑
摘要: db.Exec(query string, args ...interface{}) Db.Exec(`CREATE TABLE IF NOT EXISTS STU(ID int(8) PRIMARY KEY AUTO_INCREMENT,NAME char(50))`) 其中query中可以使用? 阅读全文
posted @ 2020-11-16 13:31 菜鸟++ 阅读(659) 评论(0) 推荐(0) 编辑
摘要: 标准方式: import ( "fmt" )使用:fmt.Println() 点(.)方式 import ( . "fmt" ) 使用时候,可以胜率fmt前缀Println() 别名 import( f "fmt" ) 使用方法:f是fmt的简称 f.Println() 下划线(_) import( 阅读全文
posted @ 2020-11-16 10:25 菜鸟++ 阅读(2287) 评论(0) 推荐(0) 编辑