Add comment filter for config
This commit is contained in:
@@ -20,7 +20,7 @@ type _Options struct {
|
||||
type Options _Options
|
||||
|
||||
func (o *Options) UnmarshalJSON(content []byte) error {
|
||||
decoder := json.NewDecoder(bytes.NewReader(content))
|
||||
decoder := json.NewDecoder(json.NewCommentFilter(bytes.NewReader(content)))
|
||||
decoder.DisallowUnknownFields()
|
||||
err := decoder.Decode((*_Options)(o))
|
||||
if err == nil {
|
||||
|
||||
Reference in New Issue
Block a user