Correcting all go vet errors

This commit is contained in:
Kris Rousey
2015-08-07 18:52:23 -07:00
parent 9fdd793555
commit 565189f5b8
118 changed files with 285 additions and 298 deletions

View File

@@ -92,7 +92,7 @@ func (g *conversionGenerator) GenerateConversionsForType(version string, reflect
}
internalObjType := reflect.TypeOf(internalObj)
if internalObjType.Kind() != reflect.Ptr {
return fmt.Errorf("created object should be of type Ptr: ", internalObjType.Kind())
return fmt.Errorf("created object should be of type Ptr: %v", internalObjType.Kind())
}
inErr := g.generateConversionsBetween(reflection, internalObjType.Elem())
outErr := g.generateConversionsBetween(internalObjType.Elem(), reflection)
@@ -173,7 +173,6 @@ func (g *conversionGenerator) generateConversionsBetween(inType, outType reflect
// All simple types should be handled correctly with default conversion.
return nil
}
panic("This should never happen")
}
func isComplexType(reflection reflect.Type) bool {