犹豫画笔

文章
5
资源
0
加入时间
3年1月15天

go import导入包(. _ 别名)等问题

1.正常import代码包1.import "fmt"2.在代码中就可以使用fmt包中的方法,如: fmt.Println("hello world")2.使用点操作引入包时,可以省略包前缀1.fmt前多了 . 字符,使用方法如下,前缀fmt就不需要了Println("hello world")3.使用别名操作可以给包起个小名儿1.import f "fmt" 2.f.Println("hello worl