随笔分类 - golang
摘要:1) Append a slice b to an existing slice a: a = append(a, b...)2) Copy a slice a to a new slice b: b = make([]T, len(a))copy(b, a)3) Delete item at in...
阅读全文
摘要:试试go来一个简单的web server 1 package main 2 3 import ( 4 "fmt" 5 "net/http" 6 ) 7 8 // Default Request Handler 9 func defaultHandler(w http.ResponseWriter, r *http.Request) {10 fmt.Fprintf(w, "<h1>Hello %s!</h1>", r.URL.Path[1:])11 }12 13 func main() {14 http.Hand
阅读全文
浙公网安备 33010602011771号