golang 开发语言 后端 goland 2027 1.4、 go版本1.19中使用 os.File 关闭文件时报错 “Unresolved reference ‘Close‘“ - src -->
golang 开发语言 后端 goland 2027 1.4、 go版本1.19中使用 os.File 关闭文件时报错 “Unresolved reference ‘Close‘“
4天前1310
写代码的时候出现了错误 查了很久找到了问题所在
查看 Go SDK -->src -->os -->file_posix.go 中的 go build 标签 拼多多帮助力入口
Go 1.19 引入了unix构建标签。因此,需要您添加unix到自定义标签
我这里只在 Preferences -->Go -->Build Tags & Vendoring -->Custom tags 添加 unix 即可