Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / honnef.co / go / tools@v0.0.1-2020.1.5 / staticcheck / testdata / src / CheckListenAddress / CheckListenAddress.go
1 package pkg
2
3 import "net/http"
4
5 func fn() {
6         // Seen in actual code
7         http.ListenAndServe("localhost:8080/", nil) // want `invalid port or service name in host:port pair`
8         http.ListenAndServe("localhost", nil)       // want `invalid port or service name in host:port pair`
9         http.ListenAndServe("localhost:8080", nil)
10         http.ListenAndServe(":8080", nil)
11         http.ListenAndServe(":http", nil)
12         http.ListenAndServe("localhost:http", nil)
13         http.ListenAndServe("local_host:8080", nil)
14 }