I can't reproduce this behavior. What version of Go are you running?

On Thu, Aug 9, 2018, at 14:27, russo...@gmail.com wrote:
> With the following code, running go fmt shows different behavior depending 
> on the (1) length of the keys, and (2) the order of the keys.
> 
> var m_19_chars = map[string]int{
>  "i":   0,
>  "iii": 0,
>  "iiiiiiiiiiiiiiiiiii": 0,
> }
> var m_18_chars = map[string]int{
>  "i":                  0,
>  "iii":                0,
>  "iiiiiiiiiiiiiiiiii": 0,
> }
> var m_19_chars_reorder = map[string]int{
>  "i": 0,
>  "iiiiiiiiiiiiiiiiiii": 0,
>  "iii": 0,
> }
> 
> 
> In the 1st map, the unexpected behavior is that the first two values are 
> indented a different amount than the third.
> 
> In the 2nd map, the large key is reduced to 18 chars long.  All keys are 
> indented evenly, as expected.
> 
> In the 3rd map, the large key is now 19 chars long again, but is listed 
> second.  Now all 3 values are indented differently.
> 
> -- 
> You received this message because you are subscribed to the Google 
> Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


-- 
Sam Whited
s...@samwhited.com

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to