初级会员
  • 第 19679 位会员
  • zhexiao
  • 2018-06-26 15:46:24
  • Offline
  • 20 61

最近发布的文章

    暂无

最近分享的资源

    暂无

最近发布的项目

    暂无

最近的评论

  • Goland,可以帮你自动加载包,提示错误等。初学者使用很方便
  • 问题已解决,这是我在Stack Overflow上留言得到的回复: It depends how you look at it. You are using package fmt print verb defaults (%v). Here's some other ways to look at it using other print verbs. ``` package main import "fmt" type Employee struct { ID int Name string } func main() { var zhexiao Employee zhexiao.Name = "xiao" fmt.Printf("%[1]v %[1]p\n", &zhexiao) x := 1 fmt.Printf("%[1]v %[2]p\n", x, &x) p := &x fmt.Printf("%[1]v %[1]p\n", p) } ``` Playground: https://play.golang.org/p/4dV8HtiS8rP Output: ``` &{0 xiao} 0x1040a0d0 1 0x1041402c 0x1041402c 0x1041402c ```