Przeglądaj źródła

Fix printing the address we're listening on

Lucas Stadler 9 lat temu
rodzic
commit
60b203733d
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      go/favicon/favicon.go

+ 1 - 1
go/favicon/favicon.go

31
	}
31
	}
32
32
33
	addr := fmt.Sprintf("localhost:%d", *port)
33
	addr := fmt.Sprintf("localhost:%d", *port)
34
	fmt.Printf("listening on %s\n", addr)
34
	err := http.ListenAndServe(addr, nil)
35
	err := http.ListenAndServe(addr, nil)
35
	if err != nil {
36
	if err != nil {
36
		fmt.Println("error: ", err)
37
		fmt.Println("error: ", err)
37
		os.Exit(1)
38
		os.Exit(1)
38
	}
39
	}
39
	fmt.Printf("listening on %s\n", addr)
40
}
40
}
41
41
42
func HandleGetFavicon(w http.ResponseWriter, r *http.Request) {
42
func HandleGetFavicon(w http.ResponseWriter, r *http.Request) {