Skip to content

🌱 (chore): group const declarations into blocks for clarity #4669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,16 @@ func (sp *Sample) CodeGen() {
hackutils.CheckError("Failed to enable helm plugin", err)
}

const oldSpecAPI = "// Foo is an example field of Memcached. Edit memcached_types.go to remove/update\n\tFoo string `json:\"foo,omitempty\"`"
const newSpecAPI = `// Size defines the number of Memcached instances
const (
oldSpecAPI = "// Foo is an example field of Memcached. Edit memcached_types.go to remove/update\n\tFoo string `json:\"foo,omitempty\"`"
newSpecAPI = `// Size defines the number of Memcached instances
// The following markers will use OpenAPI v3 schema to validate the value
// More info: https://book.kubebuilder.io/reference/markers/crd-validation.html
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=3
// +kubebuilder:validation:ExclusiveMaximum=false
Size int32 ` + "`json:\"size,omitempty\"`"
)

const oldStatusAPI = `// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ import (
"sigs.k8s.io/kubebuilder/v4/pkg/machinery"
)

const caNamespace = "crdkustomizecainjectionns"
const caName = "crdkustomizecainjectionname"
const (
caNamespace = "crdkustomizecainjectionns"
caName = "crdkustomizecainjectionname"
)

// KustomizationCAConversionUpdater appends CA injection targets for CRDs with --conversion
type KustomizationCAConversionUpdater struct {
Expand Down
Loading