GO学习过程问题记录
记录所遇到的问题及产生原因和解决办法
isoyy
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Golang 时区PST转UTC
const longForm = "2006-01-02 15:04:05"startTime, err := time.ParseInLocation(longForm, req.Startime, PST)fmt.Println(startTime.UTC().Format(longForm))func ParseInLocation(layout, value string, loc *Location) (Time, error)// 参数 layout 定义输入的时间格式...原创 2022-01-15 10:51:55 · 297 阅读 · 0 评论 -
windows环境下go build 报错 go: go.mod file not found in current directory or any parent directory
第一次写helloword时遇到的问题。在命令行执行go build 准备编译 hello.go 时 提示报错go: go.mod file not found in current directory or any parent directory; see 'go help modules'解决:没有详细看过go build 命令的详细介绍,理所应当的以为当使用go build 时会自动编译GOPATH目录下所有的.go文件。但实际上当仅使用go build时意味着使用当前目录进.原创 2021-11-30 17:36:28 · 1275 阅读 · 0 评论
分享