面向對象只是一種思想,跟有沒有“類”并沒有絕對關系。
CS的引擎,半條命(half-life)了解一下。C語言沒有類的概念,以超前的思想設計了hl的代碼結構。
CS的引擎,半條命(half-life)了解一下。C語言沒有類的概念,以超前的思想設計了hl的代碼結構。
2019-08-20
reg := regexp.MustCompile(regStr)
type RequestInfo struct {
Method string
Path string
Schema string
}
type AccessInfo struct {
AccessIp string
AccessUser string
TimeLocal time.Time
RequestInfo RequestInfo
Status int
BodyBytesSend int
HttpReferrer string
HttpUserAgent string
}
type RequestInfo struct {
Method string
Path string
Schema string
}
type AccessInfo struct {
AccessIp string
AccessUser string
TimeLocal time.Time
RequestInfo RequestInfo
Status int
BodyBytesSend int
HttpReferrer string
HttpUserAgent string
}
2019-06-30
nginx combined 格式日志及解析
/*
100.116.222.152 - - [19/Sep/2018:15:28:14 +0800] "GET /api/child_star/query?classify=2&page=1&page_size=18 HTTP/1.1" 301 178 "-" "okhttp/3.10.0"
*/
regStr := `([\d\.]+)\s-\s(.*?)\s\[(.*?)\]\s"(.*?)\s(.*?)\s(.*?)"\s(\d+)\s(\d+)\s"(.*?)"\s"(.*?)"`
/*
100.116.222.152 - - [19/Sep/2018:15:28:14 +0800] "GET /api/child_star/query?classify=2&page=1&page_size=18 HTTP/1.1" 301 178 "-" "okhttp/3.10.0"
*/
regStr := `([\d\.]+)\s-\s(.*?)\s\[(.*?)\]\s"(.*?)\s(.*?)\s(.*?)"\s(\d+)\s(\d+)\s"(.*?)"\s"(.*?)"`
2019-06-30
看完啦~ 講的太好啦! 我私下給每一行都加了注釋幫助理解,這下寫代碼的思路清晰了好多~ 編程風格也很喜歡,多多向您學習~
剛在慕課上看完另一個golang教程,那個人真是講的~~巨爛, 沒有對比就沒有傷害呀~ 希望老師以后多多出寫教程~
剛在慕課上看完另一個golang教程,那個人真是講的~~巨爛, 沒有對比就沒有傷害呀~ 希望老師以后多多出寫教程~
2019-05-31