开发者社区 问答 正文

go语言 declared and not used

go语言报错: xxx declared and not used 代码类似:

var test Test type Test struct{ Name string }

func main(){ test := Text{name:"test"} }

func set(t Test){ test = t }

展开
收起
Dynastys 2021-10-21 10:44:07 648 分享 版权
1 条回答
写回答
取消 提交回答
  • test = Text{name:”test”}这个地方写错了铁子

    2021-10-21 10:44:38
    赞同 展开评论
问答分类:
Go
问答标签:
问答地址: