osinfo

package
v0.0.0-...-df570b3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2018 License: MIT Imports: 5 Imported by: 1

Documentation

Overview

Package osinfo is taking from the github.com/docker/machine project.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	AnsiColor    string `osr:"ANSI_COLOR"`
	Name         string `osr:"NAME"`
	Version      string `osr:"VERSION"`
	Variant      string `osr:"VARIANT"`
	VariantID    string `osr:"VARIANT_ID"`
	ID           string `osr:"ID"`
	IDLike       string `osr:"ID_LIKE"`
	PrettyName   string `osr:"PRETTY_NAME"`
	VersionID    string `osr:"VERSION_ID"`
	HomeURL      string `osr:"HOME_URL"`
	SupportURL   string `osr:"SUPPORT_URL"`
	BugReportURL string `osr:"BUG_REPORT_URL"`
}

Info reflects values in /etc/os-release Values in this struct must always be string or the reflection will not work properly.

func NewInfo

func NewInfo(contents []byte) (*Info, error)

NewInfo returns a giving OSRelease instance from the provided content.

func (*Info) ParseInfo

func (osr *Info) ParseInfo(osReleaseContents []byte) error

ParseInfo attempts to parse the provided data.

Jump to

Keyboard shortcuts

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