You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I happen to have several Kinds that are generically named, e.g. component, resource, group, system, domain, user.
In a few instances, in generated code, these terms conflict with the generated terms. Here are two such cases:
with a kind of resource the package from github.com/grafana/grafana-app-sdk/resource would conflict, and I would have to rename the generated import to sdk_resource
with a kind of group the generated constants.go generates a Groupconst that clashes with the Kind.
#1 is not bad as it manifests in operator code, which is typically on generated once. #2 is in code that is re-generated often
const (
// Group is the API group used by all kinds in this packageGroup="servicemodel.ext.grafana.com"// Version is the API version used by all kinds in this packageVersion="v1alpha1"
)
Perhaps ApiGroup or somesuch
The text was updated successfully, but these errors were encountered:
Rename generated 'Group' and 'Version' constants to 'APIGroup' and
'APIVersion' to avoid naming conflicts with kinds. Use
machinename+version for package alias in generated watcher code to avoid
similar conflicts.
Resolves#666
I happen to have several Kinds that are generically named, e.g. component, resource, group, system, domain, user.
In a few instances, in generated code, these terms conflict with the generated terms. Here are two such cases:
resource
the package fromgithub.com/grafana/grafana-app-sdk/resource
would conflict, and I would have to rename the generated import tosdk_resource
group
the generatedconstants.go
generates aGroup
const
that clashes with the Kind.#1 is not bad as it manifests in operator code, which is typically on generated once.
#2 is in code that is re-generated often
pkg/generated/resource/group/v1alpha1/constants.go
Perhaps
ApiGroup
or somesuchThe text was updated successfully, but these errors were encountered: