Skip to content

Commit a543674

Browse files
committed
fix: rename to KubebuilderExactlyOneOf for consistency
1 parent 00be0af commit a543674

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/analysis/arrayofstruct/analyzer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var Analyzer = &analysis.Analyzer{
4141
}
4242

4343
func init() {
44-
markershelper.DefaultRegistry().Register(markers.KubebuilderValidationExactlyOneOf)
44+
markershelper.DefaultRegistry().Register(markers.KubebuilderExactlyOneOf)
4545
}
4646

4747
func run(pass *analysis.Pass) (any, error) {
@@ -232,5 +232,5 @@ func hasExactlyOneOfMarker(structType *ast.StructType, markersAccess markershelp
232232
// Use StructMarkers to get the set of markers on the struct
233233
markerSet := markersAccess.StructMarkers(structType)
234234

235-
return markerSet.Has(markers.KubebuilderValidationExactlyOneOf)
235+
return markerSet.Has(markers.KubebuilderExactlyOneOf)
236236
}

pkg/markers/markers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ const (
9393
// KubebuilderRequiredMarker is the marker that indicates that a field is required in kubebuilder.
9494
KubebuilderRequiredMarker = "kubebuilder:validation:Required"
9595

96-
// KubebuilderValidationExactlyOneOf is the marker that indicates that a field has an exactly one of in kubebuilder.
97-
KubebuilderValidationExactlyOneOf = "kubebuilder:validation:ExactlyOneOf"
96+
// KubebuilderExactlyOneOf is the marker that indicates that a field has an exactly one of in kubebuilder.
97+
KubebuilderExactlyOneOf = "kubebuilder:validation:ExactlyOneOf"
9898

9999
// KubebuilderItemsMaxLengthMarker is the marker that indicates that a field has a maximum length in kubebuilder.
100100
KubebuilderItemsMaxLengthMarker = "kubebuilder:validation:items:MaxLength"

0 commit comments

Comments
 (0)