2019年8月14日
摘要: import ( f "fmt" ) f是fmt的别名 '.' 可省略包名,不建议使用 只会执行fmt中init函数,不能使用fmt中函数(作用注册包引擎) 阅读全文
posted @ 2019-08-14 11:04 清明-心若淡定 阅读(253) 评论(0) 推荐(0)
摘要: package name 尽量与目录名称一样 package name: 表示代码文件所属的包 阅读全文
posted @ 2019-08-14 11:00 清明-心若淡定 阅读(193) 评论(0) 推荐(0)
摘要: package main import ( "fmt" ) const NAME string = "imooc" var a string = "慕课网" type imoocInt int type learn struct { } type ilearn interface { } func myfun() { fmt.Println(NAME) fmt.Println(... 阅读全文
posted @ 2019-08-14 09:11 清明-心若淡定 阅读(197) 评论(0) 推荐(0)