platform

package
v0.0.0-...-d707f67 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 12 Imported by: 159

Documentation

Overview

Package platform contains platform specific utilities.

Package platform contains platform specific utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hostname

func Hostname(log log.T) (name string, err error)

Hostname of the computer.

func IP

func IP() (selected string, err error)

IP of the network interface

func IsPlatformNanoServer

func IsPlatformNanoServer(log log.T) (bool, error)

func IsPlatformWindowsServer2012OrEarlier

func IsPlatformWindowsServer2012OrEarlier(log log.T) (bool, error)

IsPlatformWindowsServer2012OrEarlier represents whether it is Windows 2012 and earlier or not

func IsPlatformWindowsServer2025OrLater

func IsPlatformWindowsServer2025OrLater(log log.T) (bool, error)

IsPlatformWindowsServer2025OrLater returns true if current platform is Windows Server 2025 or later

func IsWindowsServer2025OrLater

func IsWindowsServer2025OrLater(platformVersion string, log log.T) (bool, error)

IsWindowsServer2025OrLater returns true if passed platformVersion is the same as of Windows Server 2025 or later

func PlatformName

func PlatformName(log log.T) (name string, err error)

PlatformName gets the OS specific platform name.

func PlatformSku

func PlatformSku(log log.T) (sku string, err error)

PlatformSku gets the OS specific platform SKU number

func PlatformType

func PlatformType(log log.T) (name string, err error)

PlatformType gets the OS specific platform type, valid values are windows and linux.

func PlatformVersion

func PlatformVersion(log log.T) (version string, err error)

PlatformVersion gets the OS specific platform version.

Types

This section is empty.

Jump to

Keyboard shortcuts

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