[go-nuts] io.MultiWriter has an extra check to bytes written

2016-09-25 Thread stinkingmadgod
I was fiddling around and tried implementing my own MultiWriter and after a while I was satisfied that it was an exact replica of io.MultiWriter until I actually looked: https://golang.org/src/io/multi.go line 55, if n != len(p) Why is the check even there? As I understand, the contract of the

[go-nuts] Eliminating redundant map lookups

2016-11-27 Thread stinkingmadgod
The following code is taken from https://blog.golang.org/go-maps-in-action. type Person struct {Name stringLikes []string}var people []*Person*likes := make(map[string][]*Person)*for _, p := range people {for _, l := range p.Likes {

[go-nuts] Re: Eliminating redundant map lookups

2016-11-27 Thread stinkingmadgod
I should clarify that this actually came up in practice and I have no clue on how I can eliminate them -- 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