A website inspired by Last.fm that will keep track of your listening statistics
lastfm music statistics
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update validation package to handle warning about recursive error calls when using string formating for the error map

oscar345 747545ab 04e5195c

+7 -1
+7 -1
pkg/validation/validation.go
··· 1 1 package validation 2 2 3 3 import ( 4 + "bytes" 4 5 "fmt" 5 6 ) 6 7 ··· 17 18 options Options 18 19 } 19 20 21 + // Not implemented (yet) 20 22 func WithNestedMap() Option { 21 23 return func(o *Options) { 22 24 o.NestedMap = true ··· 51 53 } 52 54 53 55 func (e Errors) Error() string { 54 - return fmt.Sprintf("%v", e) 56 + b := new(bytes.Buffer) 57 + for key, value := range e { 58 + fmt.Fprintf(b, "%s=\"%s\"\n", key, value) 59 + } 60 + return b.String() 55 61 } 56 62 57 63 // Run returns an error if there are any validation errors for one of the keys.