system

package
v2.1.155 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOsVersion

func GetOsVersion() (string, error)

GetOsVersion returns a human friendly string of the current OS in the case of an error this still returns a valid string for the details that can be found.

func SetReleaseGetter

func SetReleaseGetter(r ReleaseFileGetter)

SetReleaseGetter sets the current releaseFileGetter

Types

type DefaultReleaseFileGetter

type DefaultReleaseFileGetter struct{}

DefaultReleaseFileGetter is the default implementation of ReleaseFileGetter

func (*DefaultReleaseFileGetter) GetFileContents

func (r *DefaultReleaseFileGetter) GetFileContents(file string) (string, error)

GetFileContents returns the file contents

type ReleaseFileGetter

type ReleaseFileGetter interface {
	GetFileContents(string) (string, error)
}

ReleaseFileGetter defines the interface for read system file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL