date-time

command module
v0.0.0-...-f040508 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2023 License: MIT Imports: 3 Imported by: 0

README

date-time

go的date time示例
  • dt包日期、时间
  • sub包函数耗时
  • tick计时器
发包步骤

前提条件:

# 以发布date-time为例,在date-time文件夹下执行下面的命令:
git tag "v1.0.0"
git push origin --tags

推送tag后,就可以引用了,发包是否成功视网络情况而定,一般情况下最多30分钟就能知道是否发包成功,更多发包说明,可以参考这里https://go.dev/blog/publishing-go-modules

引用包
# 以godoc引入date-time为例,发包成功就可以直接引用
# 比如在godoc的main.go里输入dt.PrintDT(),会自动引入date-time对应的包

在引入包的过程中可能出现引入失败等疑难杂症,可以按如下步骤尝试解决:

# 清理缓存,分别在date-time和godoc下执行
rm go.mod
go clean -modcache
go get
go mod tidy

# 也可以不用删除go.mod,直接执行下面的命令
go get -u
go mod tidy

执行完上述命令,记得重启IDE,以GoLand为例:点文件=》清除缓存=》清除并重新启动

发包到pkg.go.dev后,因为某些原因要回退或者删除包,请参考这里https://pkg.go.dev/about

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package dt 日期、时间
Package dt 日期、时间
Package sub 函数耗时
Package sub 函数耗时
Package tick 计时器
Package tick 计时器

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL