
Go
Hack_Bug
这个作者很懒,什么都没留下…
展开
-
golang 之 Println call has possible formatting directive
比如这么写: fmt.Println("Hello, playground %d",i) 那么会出现warning:Println call has possible formatting directive %d Go vet exited. fmt.Printlndoesn't do formatting things like%d. Instead, it uses the default format of its arguments, and adds spaces betwee...原创 2020-12-10 00:55:38 · 4841 阅读 · 0 评论 -
Go 语言中 = 和 := 有什么区别
= 是赋值, := 是声明变量并赋值。 // = 使用必须使用先var声明例如: var a a=100 //或 var b = 100 //或 var c int = 100 // := 是声明并赋值,并且系统自动推断类型,不需要var关键字 d := 100原创 2020-12-10 00:30:13 · 249 阅读 · 0 评论