Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilesWithExtensions ¶ added in v0.16.0
FilesWithExtensions returns a list of all files in directory that end in any of the extensions provided. top level only - does not recursively visit directories.
Types ¶
type DefaultDetector ¶ added in v0.20.5
type DefaultDetector struct {
// contains filtered or unexported fields
}
DefaultDetector implements Detector
func (*DefaultDetector) GetInfo ¶ added in v0.20.5
func (d *DefaultDetector) GetInfo(osReleaseContents string) OSInfo
GetInfo returns the OS distribution name and version from the contents of /etc/os-release
func (*DefaultDetector) HasSystemdFile ¶ added in v0.20.5
func (d *DefaultDetector) HasSystemdFile() bool
HasSystemdFile returns true if /etc/os-release exists with contents
func (*DefaultDetector) InfoOnce ¶ added in v0.20.5
func (d *DefaultDetector) InfoOnce(logger log.Logger)
InfoOnce logs an info message to the provided logger, but only once in the lifetime of the receiving DefaultDetector.
func (*DefaultDetector) ReadSystemdFile ¶ added in v0.20.5
func (d *DefaultDetector) ReadSystemdFile() (string, error)
ReadSystemdFile returns the contents of /etc/os-release
func (*DefaultDetector) StoredInfo ¶ added in v0.20.5
func (d *DefaultDetector) StoredInfo() *OSInfo
StoredInfo returns any OSInfo found during the last call to GetInfo
Click to show internal directories.
Click to hide internal directories.