Closed bart0sh closed 1 week ago
Isn't that consistent naming ? I mean everywhere within pkg/cdi
, we call cdi specs-go cdi
, so the spec reference reads cdi.Spec
, not specs.Spec
. Similarly we call opencontainers/runtime-spec/spec-go oci
, so we have then oci.Spec
in the code.
Anyway we need to import one of them with a renamed alias, since we can't call both of them specs
in the same file within a module. So then probably you would have specs.Spec
instead of cdi.Spec
and maybe oci.Spec
or ocispec.Spec
for the oci Spec. Personally I'd consider both of these less readable than the current implementation choice.
Ah ok. In pkg/container-edits.go
we're inconsistent. If the current and above described reasoning is acceptable, then at least that should be changed to be consistent with the rest within pkg/cdi. And then I'd change raw to cdi in pkg/cdi/validate/schema.go as well.
Ah ok. In
pkg/container-edits.go
we're inconsistent... And then I'd change raw to cdi in pkg/cdi/validate/schema.go as well.
Filed #228 to fix those.
This seems to be closed by #228 /close
I'd propose to replace all of that with unnamed import
"tags.cncf.io/container-device-interface/specs-go"