mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-13 23:03:57 +01:00
refact(deps): bump k8s and client-go deps to version v0.20.2 (#294)
Signed-off-by: prateekpandey14 <prateek.pandey@mayadata.io>
This commit is contained in:
parent
533e17a9aa
commit
b1aa6ab51a
2196 changed files with 306727 additions and 251810 deletions
53
vendor/k8s.io/gengo/generator/generator.go
generated
vendored
53
vendor/k8s.io/gengo/generator/generator.go
generated
vendored
|
|
@ -31,6 +31,8 @@ type Package interface {
|
|||
Name() string
|
||||
// Path returns the package import path.
|
||||
Path() string
|
||||
// SourcePath returns the location of the package on disk.
|
||||
SourcePath() string
|
||||
|
||||
// Filter should return true if this package cares about this type.
|
||||
// Otherwise, this type will be omitted from the type ordering for
|
||||
|
|
@ -50,14 +52,16 @@ type Package interface {
|
|||
}
|
||||
|
||||
type File struct {
|
||||
Name string
|
||||
FileType string
|
||||
PackageName string
|
||||
Header []byte
|
||||
Imports map[string]struct{}
|
||||
Vars bytes.Buffer
|
||||
Consts bytes.Buffer
|
||||
Body bytes.Buffer
|
||||
Name string
|
||||
FileType string
|
||||
PackageName string
|
||||
Header []byte
|
||||
PackagePath string
|
||||
PackageSourcePath string
|
||||
Imports map[string]struct{}
|
||||
Vars bytes.Buffer
|
||||
Consts bytes.Buffer
|
||||
Body bytes.Buffer
|
||||
}
|
||||
|
||||
type FileType interface {
|
||||
|
|
@ -156,6 +160,12 @@ type Context struct {
|
|||
// All the types, in case you want to look up something.
|
||||
Universe types.Universe
|
||||
|
||||
// Incoming imports, i.e. packages importing the given package.
|
||||
incomingImports map[string][]string
|
||||
|
||||
// Incoming transitive imports, i.e. the transitive closure of IncomingImports
|
||||
incomingTransitiveImports map[string][]string
|
||||
|
||||
// All the user-specified packages. This is after recursive expansion.
|
||||
Inputs []string
|
||||
|
||||
|
|
@ -203,11 +213,36 @@ func NewContext(b *parser.Builder, nameSystems namer.NameSystems, canonicalOrder
|
|||
return c, nil
|
||||
}
|
||||
|
||||
// IncomingImports returns the incoming imports for each package. The map is lazily computed.
|
||||
func (ctxt *Context) IncomingImports() map[string][]string {
|
||||
if ctxt.incomingImports == nil {
|
||||
incoming := map[string][]string{}
|
||||
for _, pkg := range ctxt.Universe {
|
||||
for imp := range pkg.Imports {
|
||||
incoming[imp] = append(incoming[imp], pkg.Path)
|
||||
}
|
||||
}
|
||||
ctxt.incomingImports = incoming
|
||||
}
|
||||
return ctxt.incomingImports
|
||||
}
|
||||
|
||||
// TransitiveIncomingImports returns the transitive closure of the incoming imports for each package.
|
||||
// The map is lazily computed.
|
||||
func (ctxt *Context) TransitiveIncomingImports() map[string][]string {
|
||||
if ctxt.incomingTransitiveImports == nil {
|
||||
ctxt.incomingTransitiveImports = transitiveClosure(ctxt.IncomingImports())
|
||||
}
|
||||
return ctxt.incomingTransitiveImports
|
||||
}
|
||||
|
||||
// AddDir adds a Go package to the context. The specified path must be a single
|
||||
// go package import path. GOPATH, GOROOT, and the location of your go binary
|
||||
// (`which go`) will all be searched, in the normal Go fashion.
|
||||
// Deprecated. Please use AddDirectory.
|
||||
func (ctxt *Context) AddDir(path string) error {
|
||||
ctxt.incomingImports = nil
|
||||
ctxt.incomingTransitiveImports = nil
|
||||
return ctxt.builder.AddDirTo(path, &ctxt.Universe)
|
||||
}
|
||||
|
||||
|
|
@ -215,5 +250,7 @@ func (ctxt *Context) AddDir(path string) error {
|
|||
// single go package import path. GOPATH, GOROOT, and the location of your go
|
||||
// binary (`which go`) will all be searched, in the normal Go fashion.
|
||||
func (ctxt *Context) AddDirectory(path string) (*types.Package, error) {
|
||||
ctxt.incomingImports = nil
|
||||
ctxt.incomingTransitiveImports = nil
|
||||
return ctxt.builder.AddDirectoryTo(path, &ctxt.Universe)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue