窗户上的 Golang。尝试使用
os.Open("%userprofile%\\myfile.txt")
获取file path not found和 golang 没有解析%userprofile%到我的C:\users\myusername文件夹。
file path not found
%userprofile%
C:\users\myusername
windows environment-variables go
environment-variables ×1
go ×1
windows ×1