[Go] Fixes missing return statement (#8072) (#8090)

This commit is contained in:
fuxs
2020-12-05 11:24:22 +01:00
committed by GitHub
parent bac913f384
commit 38dbcdd752
4 changed files with 4 additions and 4 deletions

View File

@@ -415,7 +415,7 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err
return err
}
} else {
errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined")
return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined")
}
} else if err = json.Unmarshal(b, v); err != nil { // simple model
return err

View File

@@ -388,7 +388,7 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err
return err
}
} else {
errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined")
return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined")
}
} else if err = json.Unmarshal(b, v); err != nil { // simple model
return err

View File

@@ -373,7 +373,7 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err
return err
}
} else {
errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined")
return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined")
}
} else if err = json.Unmarshal(b, v); err != nil { // simple model
return err

View File

@@ -401,7 +401,7 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err
return err
}
} else {
errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined")
return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined")
}
} else if err = json.Unmarshal(b, v); err != nil { // simple model
return err