mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
conversion-gen: Report an error in conversion when names don't match
This commit is contained in:
parent
eb85c83e92
commit
a36fd65c5a
@ -179,6 +179,10 @@ func getManualConversionFunctions(context *generator.Context, pkg *types.Package
|
||||
}
|
||||
manualMap[key] = f
|
||||
} else {
|
||||
// prevent user error when they don't get the correct conversion signature
|
||||
if strings.HasPrefix(f.Name.Name, "Convert_") {
|
||||
glog.Errorf("Rename function %s %s -> %s to match expected conversion signature", f.Name.Package, f.Name.Name, buffer.String())
|
||||
}
|
||||
glog.V(8).Infof("%s has wrong name", f.Name)
|
||||
}
|
||||
buffer.Reset()
|
||||
|
Loading…
Reference in New Issue
Block a user