Golang 报错记录技术
golang 学习记录,代码记录,报错记录
_ := http.ListenAndServe(":9090", nil) // 不需要冒号 ./gin1.go:14:4: no new variables on left side of :=
package main import ( "fmt" "net/http" ) func sayHello (w http.ResponseWriter, r *http.Request) { _, _ = fmt.Fprintln(w, "Hello") } func main () { http.HandleFunc("/hello", sayHello) _ = http.ListenAndServe(":9090", nil) }
暂无