mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
build: move e2e dependencies into e2e/go.mod
Several packages are only used while running the e2e suite. These packages are less important to update, as the they can not influence the final executable that is part of the Ceph-CSI container-image. By moving these dependencies out of the main Ceph-CSI go.mod, it is easier to identify if a reported CVE affects Ceph-CSI, or only the testing (like most of the Kubernetes CVEs). Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
15da101b1b
commit
bec6090996
44
e2e/vendor/github.com/karrick/godirwalk/scanner.go
generated
vendored
Normal file
44
e2e/vendor/github.com/karrick/godirwalk/scanner.go
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
package godirwalk
|
||||
|
||||
import "sort"
|
||||
|
||||
type scanner interface {
|
||||
Dirent() (*Dirent, error)
|
||||
Err() error
|
||||
Name() string
|
||||
Scan() bool
|
||||
}
|
||||
|
||||
// sortedScanner enumerates through a directory's contents after reading the
|
||||
// entire directory and sorting the entries by name. Used by walk to simplify
|
||||
// its implementation.
|
||||
type sortedScanner struct {
|
||||
dd []*Dirent
|
||||
de *Dirent
|
||||
}
|
||||
|
||||
func newSortedScanner(osPathname string, scratchBuffer []byte) (*sortedScanner, error) {
|
||||
deChildren, err := ReadDirents(osPathname, scratchBuffer)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
sort.Sort(deChildren)
|
||||
return &sortedScanner{dd: deChildren}, nil
|
||||
}
|
||||
|
||||
func (d *sortedScanner) Err() error {
|
||||
d.dd, d.de = nil, nil
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *sortedScanner) Dirent() (*Dirent, error) { return d.de, nil }
|
||||
|
||||
func (d *sortedScanner) Name() string { return d.de.name }
|
||||
|
||||
func (d *sortedScanner) Scan() bool {
|
||||
if len(d.dd) > 0 {
|
||||
d.de, d.dd = d.dd[0], d.dd[1:]
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
Reference in New Issue
Block a user