专题文章
时长:00:00更新时间:2020-11-27 14:24:07
操作系统: CentOS 6.9_x。go语言版本: 1.8.3。问题描述;golang的log模块提供的有写日志功能,示例代码如下:/*golang log example*/package mainimport ( ";log";";os";)func main() { logFile,err := os.Create(";test1.log";) defer logFile.Close() if err。= nil { log.Fatalln(";open file error运行效果。
查看详情