From b891cf35f0b5ec5e1486d22e63bedae794a54a6d Mon Sep 17 00:00:00 2001 From: Artem Date: Thu, 3 Mar 2016 18:51:50 +0300 Subject: [PATCH] make? --- MethodSets.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MethodSets.md b/MethodSets.md index 11c9fd49..164d1833 100644 --- a/MethodSets.md +++ b/MethodSets.md @@ -68,14 +68,14 @@ Slice elements are almost identical to variables. Because they are addressable, Map elements are not addressable. Therefore, the following is an _illegal_ operation: ```go -lists := map[string]List +lists := map[string]List{} lists["primes"].Append(7) // cannot be rewritten as (&lists["primes"]).Append(7) ``` However, the following is still valid (and is the far more common case): ```go -lists := map[string]*List +lists := map[string]*List{} lists["primes"] = new(List) lists["primes"].Append(7) count := lists["primes"].Len() // can be rewritten as (*lists["primes"]).Len()