mirror of
https://github.com/golang/go
synced 2024-09-28 18:04:28 -06:00
embed: fix variable name in example
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>
This commit is contained in:
parent
11e9c8e6a1
commit
2184a76fb8
@ -14,9 +14,9 @@ import (
|
||||
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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user