摘要:
File文件操作 FileInfo接口 FileInfo接口中定义了File信息相关的方法。 type FileInfo interface { Name() string // base name of the file 文件名.扩展名 aa.txt Size() int64 // 文件大小, 字 阅读全文
摘要:
在标准库中,为我们提供了time包,里面都是关于日期时间的操作,都比较简单。 1. 获取时间对象 获取当前时间 func Now() Time // Now returns the current local time t := time.Now() 获取指定时间 func Date(year in 阅读全文