os

package
v0.0.0-...-2a0a49f Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: BSD-4-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Static value to use for reproducible builds
	ReproduciblePlaceholder = "reproducible"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OperatingSystem

type OperatingSystem struct {
	// contains filtered or unexported fields
}

parser.EnvironmentParser implementation which retrieves information using operating system utilities

func New

func New(buildTimestamp int64) *OperatingSystem

New creates a new environment parser using the golang stdlib. The buildTimestamp determines the calculation behaviour of the resulting buildinfo.EnvironmentInfo. a positive value indicates the intend to create reproducible output, in which case both the buildinfo.EnvironmentInfo#Host and buildinfo.EnvironmentInfo#User are set to #ReproduciblePlaceholder; otherwise the field value are calculated using stdlib functionality.

func (*OperatingSystem) Equal

func (s *OperatingSystem) Equal(o *OperatingSystem) bool

Equal compares the fields of this instance to the given one

func (*OperatingSystem) ParseEnvironmentInfo

func (s *OperatingSystem) ParseEnvironmentInfo() (*buildinfo.EnvironmentInfo, error)

ParseEnvironmentInfo implements the parser.EnvironmentParser interface

func (*OperatingSystem) String

func (s *OperatingSystem) String() string

String implements the fmt.Stringer interface

Jump to

Keyboard shortcuts

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