Fix: patch config API

This commit is contained in:
Dreamacro
2018-11-28 10:38:30 +08:00
parent f6743d4d21
commit a64cea5011
3 changed files with 7 additions and 6 deletions

View File

@ -25,7 +25,7 @@ const (
// UnmarshalJSON unserialize Mode
func (m *Mode) UnmarshalJSON(data []byte) error {
var tp string
json.Unmarshal(data, tp)
json.Unmarshal(data, &tp)
mode, exist := ModeMapping[tp]
if !exist {
return errors.New("invalid mode")