diff --git a/gee-cache/day5-multi-nodes/main.go b/gee-cache/day5-multi-nodes/main.go index a99940c..b8677f2 100644 --- a/gee-cache/day5-multi-nodes/main.go +++ b/gee-cache/day5-multi-nodes/main.go @@ -73,8 +73,7 @@ func main() { 8003: "http://localhost:8003", } - addrs := make([]string, 3) - + var addrs []string for _, v := range addrMap { addrs = append(addrs, v) } diff --git a/gee-cache/day6-single-flight/main.go b/gee-cache/day6-single-flight/main.go index a99940c..b8677f2 100644 --- a/gee-cache/day6-single-flight/main.go +++ b/gee-cache/day6-single-flight/main.go @@ -73,8 +73,7 @@ func main() { 8003: "http://localhost:8003", } - addrs := make([]string, 3) - + var addrs []string for _, v := range addrMap { addrs = append(addrs, v) } diff --git a/gee-cache/day7-proto-buf/main.go b/gee-cache/day7-proto-buf/main.go index a99940c..b8677f2 100644 --- a/gee-cache/day7-proto-buf/main.go +++ b/gee-cache/day7-proto-buf/main.go @@ -73,8 +73,7 @@ func main() { 8003: "http://localhost:8003", } - addrs := make([]string, 3) - + var addrs []string for _, v := range addrMap { addrs = append(addrs, v) } diff --git a/gee-cache/doc/geecache-day5.md b/gee-cache/doc/geecache-day5.md index 28111ae..4e28083 100644 --- a/gee-cache/doc/geecache-day5.md +++ b/gee-cache/doc/geecache-day5.md @@ -280,8 +280,7 @@ func main() { 8003: "http://localhost:8003", } - addrs := make([]string, 3) - + var addrs []string for _, v := range addrMap { addrs = append(addrs, v) }