golang 为 struct 自动添加 tags
golang 为 struct 自动添加 tags
vscode 中的 go 0.12.0 版本新加入了一个 auto add tags 的功能。
setting.json 配置如下
| |
在 example.go 中创建一个 struct
| |
将光标移动到 struct 结构体中, 使用 command + shift + p 选择 go: add tag for struct 即可
result
| |
- 原文链接:https://typonotes.com/posts/2020/12/11/tips-auto-add-tags/
- 本文为原创文章,转载注明出处。
- 欢迎 扫码关注公众号
Go与云原生或 订阅网站 https://typonotes.com/ 。 - 第一时间看后续精彩文章。觉得好的话,请猛击文章右下角「在看」,感谢支持。


