文章分类 -  golang

golang学习笔记
摘要:package mainimport ( "fmt" "strings")func formatDuration(seconds int) string { if seconds == 0 { return "0秒" } var parts []string units := []struct { 阅读全文
posted @ 2025-02-26 13:48 想飞的枫叶 阅读(28) 评论(0) 推荐(0)
摘要:代码如下 复制代码 package main import ( "bufio" //缓存IO "fmt" "io/ioutil" //io 工具包 "io" "os" ) func check(e error) { if e != nil { panic(e) } } /** * 判断文件是否存在 阅读全文
posted @ 2016-02-22 18:58 想飞的枫叶 阅读(1901) 评论(0) 推荐(0)