os

package
Version: v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Overview

Package os provides OS Release information, /etc/os-release.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OS

type OS struct {
	Name         string `json:"name"`
	ID           string `json:"id"`
	IDLike       string `json:"id_like"`
	PrettyName   string `json:"pretty_name"`
	Version      string `json:"version"`
	VersionID    string `json:"version_id"`
	HomeURL      string `json:"home_url"`
	BugReportURL string `json:"bug_report_url"`
}

OS holds information about the OS release.

func Get

func Get() (os *OS, err error)

Get gets the OS release information using the package's global Profiler.

type Profiler

type Profiler struct {
	joe.Procer
	*joe.Buffer
}

Profiler processes the OS release information, /etc/os-release.

func NewProfiler

func NewProfiler() (prof *Profiler, err error)

Returns an initialized Profiler; ready to use.

func (*Profiler) Get

func (prof *Profiler) Get() (os *OS, err error)

Get gets the OS release information, the /etc/os-release.

func (*Profiler) Reset

func (prof *Profiler) Reset() error

Reset resources: after reset, the profiler is ready to be used again.

Source Files

Directories

Path Synopsis
Package os provides OS Release information, /etc/os-release.
Package os provides OS Release information, /etc/os-release.
Package os provides OS Release information, /etc/os-release.
Package os provides OS Release information, /etc/os-release.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL