Bump sigs.k8s.io/controller-tools from 0.6.2 to 0.11.1 (#5432)
This commit is contained in:
22
vendor/sigs.k8s.io/controller-tools/pkg/markers/zip.go
generated
vendored
22
vendor/sigs.k8s.io/controller-tools/pkg/markers/zip.go
generated
vendored
@@ -67,12 +67,22 @@ func extractDoc(node ast.Node, decl *ast.GenDecl) string {
|
||||
// chop off the extraneous last part
|
||||
outLines = outLines[:len(outLines)-1]
|
||||
}
|
||||
// respect double-newline meaning actual newline
|
||||
|
||||
for i, line := range outLines {
|
||||
// Trim any extranous whitespace,
|
||||
// for handling /*…*/-style comments,
|
||||
// which have whitespace preserved in go/ast:
|
||||
line = strings.TrimSpace(line)
|
||||
|
||||
// Respect that double-newline means
|
||||
// actual newline:
|
||||
if line == "" {
|
||||
outLines[i] = "\n"
|
||||
} else {
|
||||
outLines[i] = line
|
||||
}
|
||||
}
|
||||
|
||||
return strings.Join(outLines, " ")
|
||||
}
|
||||
|
||||
@@ -139,11 +149,11 @@ type TypeCallback func(info *TypeInfo)
|
||||
// EachType collects all markers, then calls the given callback for each type declaration in a package.
|
||||
// Each individual spec is considered separate, so
|
||||
//
|
||||
// type (
|
||||
// Foo string
|
||||
// Bar int
|
||||
// Baz struct{}
|
||||
// )
|
||||
// type (
|
||||
// Foo string
|
||||
// Bar int
|
||||
// Baz struct{}
|
||||
// )
|
||||
//
|
||||
// yields three calls to the callback.
|
||||
func EachType(col *Collector, pkg *loader.Package, cb TypeCallback) error {
|
||||
|
||||
Reference in New Issue
Block a user