ZhangZhihui's Blog  
上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 102 下一页

2024年6月10日

摘要: package main import ( "fmt" "io" "log" "os" "path" ) func main() { flag := os.O_APPEND | os.O_CREATE | os.O_WRONLY logFile := path.Join(os.TempDir(), 阅读全文
posted @ 2024-06-10 15:36 ZhangZhihuiAAA 阅读(10) 评论(0) 推荐(0)
 
摘要: package main import ( "fmt" "os" "path/filepath" ) func main() { args := os.Args if len(args) == 1 { fmt.Println("Please provide an argument!") return 阅读全文
posted @ 2024-06-10 15:27 ZhangZhihuiAAA 阅读(9) 评论(0) 推荐(0)

2024年6月9日

摘要: package main import ( "fmt" "os" "strconv" ) func main() { arguments := os.Args if len(arguments) == 1 { fmt.Println("Not enough arguments") } var tot 阅读全文
posted @ 2024-06-09 21:37 ZhangZhihuiAAA 阅读(11) 评论(0) 推荐(0)
 
摘要: 阅读全文
posted @ 2024-06-09 21:00 ZhangZhihuiAAA 阅读(23) 评论(0) 推荐(0)

2024年6月4日

摘要: 由上可以看出,当return语句中有函数调用时,先执行return中调用的函数,再执行defer的语句。 用Ctrl+C中断程序运行时defer语句不会被自动执行。 阅读全文
posted @ 2024-06-04 20:09 ZhangZhihuiAAA 阅读(13) 评论(0) 推荐(0)

2024年5月27日

摘要: Patterns ¶ Patterns can match the method, host and path of a request. Some examples: "/index.html" matches the path "/index.html" for any host and met 阅读全文
posted @ 2024-05-27 13:07 ZhangZhihuiAAA 阅读(35) 评论(0) 推荐(0)

2024年5月25日

摘要: Choosing a value or pointer receiver There are two reasons to use a pointer receiver. The first is so that the method can modify the value that its re 阅读全文
posted @ 2024-05-25 18:52 ZhangZhihuiAAA 阅读(20) 评论(0) 推荐(0)
 
摘要: type Person struct { Id int `json:"id"` GivenName string `json:"given_name"` FamilyName string `json:"family_name"` Email string `json:"email"` } func 阅读全文
posted @ 2024-05-25 09:38 ZhangZhihuiAAA 阅读(12) 评论(0) 推荐(0)

2024年5月24日

摘要: 7-bit ASCII Character Codes The ASCII table contains letters, numbers, control characters, and other symbols. Each character is assigned a unique 7-bi 阅读全文
posted @ 2024-05-24 09:30 ZhangZhihuiAAA 阅读(31) 评论(0) 推荐(0)

2024年5月22日

摘要: Problems with byte order are frustrating, and I want to spare you the grief I experienced. Here's the key: Problem: Computers speak different language 阅读全文
posted @ 2024-05-22 22:12 ZhangZhihuiAAA 阅读(31) 评论(0) 推荐(0)
上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 102 下一页