Clean up error logs.

Use %v for errors, tidy some messages, make error messages start lowe-case
(as per go guidelines).  Just accumulated nits.
This commit is contained in:
Tim Hockin
2014-11-20 18:00:36 +08:00
parent c688bd402f
commit ea960711ff
53 changed files with 163 additions and 163 deletions

View File

@@ -148,9 +148,9 @@ func (s *Scheme) NewObject(versionName, typeName string) (interface{}, error) {
if t, ok := types[typeName]; ok {
return reflect.New(t).Interface(), nil
}
return nil, fmt.Errorf("No type '%v' for version '%v'", typeName, versionName)
return nil, fmt.Errorf("no type '%v' for version '%v'", typeName, versionName)
}
return nil, fmt.Errorf("No version '%v'", versionName)
return nil, fmt.Errorf("no version '%v'", versionName)
}
// AddConversionFuncs adds functions to the list of conversion functions. The given
@@ -276,7 +276,7 @@ func (s *Scheme) ObjectVersionAndKind(obj interface{}) (apiVersion, kind string,
version, vOK := s.typeToVersion[t]
kinds, kOK := s.typeToKind[t]
if !vOK || !kOK {
return "", "", fmt.Errorf("Unregistered type: %v", t)
return "", "", fmt.Errorf("unregistered type: %v", t)
}
apiVersion = version
kind = kinds[0]