@@ -19,12 +19,14 @@ import (
19
19
20
20
// Information about extracted files.
21
21
type fileMetadata struct {
22
- // If true, the file has executable permissions.
22
+ // If true, the file is regular and has executable permissions.
23
23
isExecutable bool
24
24
// If true, contents can be extracted from the filesystem.
25
25
isExtractable bool
26
26
}
27
27
28
+ var _ analyzer.Files = (* filesMap )(nil )
29
+
28
30
// filesMap is an analyzer.Files implementation mapping files extracted from
29
31
// filesystem directories. In this implementation the file content is read lazily
30
32
// when calls to Get() are made. If an error occurs during content read the map
@@ -40,7 +42,7 @@ type filesMap struct {
40
42
readError error
41
43
}
42
44
43
- // Components contains the result of a node analyzis , listing the O.S. namespace,
45
+ // Components contains the result of a node analysis , listing the OS namespace,
44
46
// components and language components.
45
47
type Components struct {
46
48
OSNamespace * database.Namespace
@@ -64,7 +66,7 @@ func Analyze(nodeName, rootFSdir string, uncertifiedRHEL bool) (*Components, err
64
66
if err != nil {
65
67
return nil , nil
66
68
}
67
- // File reading errors during analysis are not exposed to DetectFiles , hence we
69
+ // File reading errors during analysis are not exposed to DetectComponents , hence we
68
70
// check it and if there were any we fail.
69
71
if err := files .readErr (); err != nil {
70
72
return nil , errors .Wrapf (err , "analysis of node %q failed" , nodeName )
0 commit comments