Skip to content

Commit af37962

Browse files
committed
Update compatibility gen to gengo v2
1 parent ed97866 commit af37962

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/codegen/pkg/compatibility/compatibility.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/dave/dst"
1515
"github.com/dave/dst/decorator"
1616
"github.com/dave/dst/dstutil"
17-
"k8s.io/gengo/types"
17+
"k8s.io/gengo/v2"
1818
"k8s.io/klog/v2"
1919
)
2020

@@ -252,7 +252,7 @@ func (g *compatibilityLevelCommentGenerator) applyCompatibilityLevelComment() ds
252252
}
253253

254254
func extractCompatibilityLevel(spec *dst.GenDecl) (int, bool) {
255-
tags := types.ExtractCommentTags("// +", spec.Decorations().Start.All())
255+
tags := gengo.ExtractCommentTags("// +", spec.Decorations().Start.All())
256256
value, ok := tags[levelTagName]
257257
if !ok {
258258
return 0, false
@@ -270,7 +270,7 @@ func extractCompatibilityLevel(spec *dst.GenDecl) (int, bool) {
270270
}
271271

272272
func extractIsInternal(spec *dst.GenDecl) bool {
273-
tags := types.ExtractCommentTags("// +", spec.Decorations().Start.All())
273+
tags := gengo.ExtractCommentTags("// +", spec.Decorations().Start.All())
274274
value, ok := tags[internalTagName]
275275
if !ok {
276276
return false

0 commit comments

Comments
 (0)