Use variable 'mux' for an http.ServeMux, not 'mutex'.
Change-Id: I58e9a8ebacbb61727ec4b8e4d0fd7f73e86ab381
Reviewed-on: https://go-review.googlesource.com/c/go/+/539515
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Run-TryBot: qiulaidongfeng <
2645477756@qq.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: qiulaidongfeng <2645477756@qq.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Emmanuel Odeke <emmanuel@orijtech.com>
var content embed.FS
func Example() {
- mutex := http.NewServeMux()
- mutex.Handle("/", http.FileServer(http.FS(content)))
- err := http.ListenAndServe(":8080", mutex)
+ mux := http.NewServeMux()
+ mux.Handle("/", http.FileServer(http.FS(content)))
+ err := http.ListenAndServe(":8080", mux)
if err != nil {
log.Fatal(err)
}