platform

package
v0.0.0-...-e4c3281 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Platforms

func Platforms() []string

Platforms returns the string array of the available Platforms.

Types

type Platform

type Platform uint32

Platform holds the available TLDR page platforms.

const (
	// UNKNOWN is for unknown platform type
	UNKNOWN Platform = iota
	// COMMON is a reference to the common directory of the TLDR page assets.
	COMMON
	// LINUX is a reference to the linux directory of the TLDR page assets.
	LINUX
	// OSX is a reference to the osx directory of the TLDR page assets.
	OSX
	// SUNOS is a reference to the sunos directory of the TLDR page assets.
	SUNOS
	// WINDOWS is a reference to the windows directory of the TLDR page assets.
	WINDOWS
)

func Actual

func Actual() Platform

Actual returns the runtime platform. If a valid platform is not found it it returns COMMON.

func Parse

func Parse(p string) Platform

Parse returns the Platform if valid. If the provided platform is not valid it returns an UNKNOWN platform.

func ParseFlag

func ParseFlag(p *flag.Flag) Platform

ParseFlag parses the provided command line platform Flag

func (Platform) String

func (p Platform) String() string

Strings provides the string based representation of the Platform

Jump to

Keyboard shortcuts

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