Update api.go
making definitionAlias unexported
bonus: adding space to comments for consistency
@@ -48,11 +48,11 @@ func (d *Definition) Validate() (bool, error) {
return govalidator.ValidateStruct(d)
}
-// UnmarshalJSON api.Definition JSON.Unmarshaller Implementation
+// UnmarshalJSON api.Definition JSON.Unmarshaller implementation
func (d *Definition) UnmarshalJSON(b []byte) error {
// Aliasing Definition to avoid recursive call of this method
- type DefinitionAlias Definition
- defAlias := DefinitionAlias(*NewDefinition())
+ type definitionAlias Definition
+ defAlias := definitionAlias(*NewDefinition())
if err := json.Unmarshal(b, &defAlias); err != nil {
return err
