This commit is contained in:
crusader 2018-04-13 16:58:52 +09:00
parent 9d8e274d6f
commit 43dd61f856

View File

@ -47,7 +47,7 @@ func (st TargetType) String() string {
func (st *TargetType) MarshalJSON() ([]byte, error) {
value, ok := targetTypeID[*st]
if !ok {
return nil, fmt.Errorf("Invalid EnumType[%s] value", st)
return nil, fmt.Errorf("Invalid EnumType[%s] value", *st)
}
return json.Marshal(value)
}
@ -64,6 +64,6 @@ func (st *TargetType) UnmarshalJSON(b []byte) error {
if !ok {
return fmt.Errorf("Invalid EnumType[%s] value", s)
}
st = &value
*st = value
return nil
}