Skip to content

Commit ae469e5

Browse files
committed
fix up comment for clarity
1 parent 26b9e3e commit ae469e5

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

pkg/deprecations/warnings.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@ import (
1919

2020
const DeprecatedPrefix = "Deprecated"
2121

22-
// FindDeprecatedFieldWarnings inspects an arbitrary Kubernetes object (a
23-
// `client.Object`) and returns a slice of deprecation warning messages for any
24-
// struct fields (including nested structs that have a field whose name is prefixed
25-
// with "Deprecated" and whose value is not the zero value. The name shown in the
26-
// warning is taken from the field's `json` tag when present and contains the whole
27-
// json path to the field.
22+
// FindDeprecatedFieldWarnings inspects an arbitrary `client.Object` and returns a
23+
// deprecation warning messages for any deeply nested struct fields that have a field
24+
// prefixed with "Deprecated" and whose value is not the zero value. The name shown in the
25+
// warning is taken from the field's full json path from the root of the CRD.
2826
func FindDeprecatedFieldWarnings(obj client.Object) ([]string, error) {
2927
v := reflect.ValueOf(obj)
3028
if v.Kind() == reflect.Pointer {

0 commit comments

Comments
 (0)