Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Commit 265b622

Browse files
committed
add comments for functions
1 parent 7024d3b commit 265b622

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

cmd/diff.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ func checkFilenameFlag(_ []string) error {
7070
return errors.New("please include --types=file with the --filename flag")
7171
}
7272

73+
// processImage is a concurrency-friendly wrapper around getImageForName
7374
func processImage(imageName string, imageMap map[string]*pkgutil.Image, wg *sync.WaitGroup, errChan chan<- error) {
7475
defer wg.Done()
7576
image, err := getImageForName(imageName)

cmd/root.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ func checkIfValidAnalyzer(_ []string) error {
132132
return nil
133133
}
134134

135+
// getImageForName infers the source of an image and retrieves a v1.Image reference to it.
136+
// Once a reference is obtained, it attempts to unpack the v1.Image's reader's contents
137+
// into a temp directory on the local filesystem.
135138
func getImageForName(imageName string) (pkgutil.Image, error) {
136139
logrus.Infof("retrieving image: %s", imageName)
137140
var img v1.Image

0 commit comments

Comments
 (0)