koding / multiconfig

Load configuration from multiple sources in Go
http://godoc.org/github.com/koding/multiconfig
MIT License
454 stars 64 forks source link

fix fieldValue for go1.7 flag package #51

Closed rjeczalik closed 8 years ago

rjeczalik commented 8 years ago

Flag package tries to call String() on a zero-value of type registered to a FlagSet:

https://github.com/golang/go/blob/7419073/src/flag/flag.go#L390-L394

This PR makes the fieldValue zero-value safe, at least to not panic when calling String().

Fixes #50.