application

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: Apache-2.0 Imports: 10 Imported by: 5

README

application

application provides OS and environment utilities for host/platform detection and system identity.

Functions

Function Description
OS() string Returns "Windows" or "*nix" based on the runtime platform
IsRunningOnWindows() bool Returns true when running on Windows
RunningInDockerContainer() bool (Deprecated) Delegates to dockerHelpers.IsDockerContainer()
HostName() string Returns the lowercase hostname of the machine
HostIP() string Returns the first non-loopback IPv4 address
SystemIdentity() string Returns a cleaned, lowercase host identifier (alphanumeric only)

Constants

  • WINDOWS"Windows"
  • NIX"*nix"

Example

import "github.com/mt1976/frantic-core/application"

func main() {
    fmt.Println("OS:", application.OS())
    fmt.Println("Host:", application.HostName())
    fmt.Println("IP:", application.HostIP())
    fmt.Println("Identity:", application.SystemIdentity())
}

Documentation

Overview

Package application contains OS and environment utilities such as host/platform detection and basic system identity helpers.

Index

Constants

View Source
const (
	WINDOWS = "Windows"
	NIX     = "*nix"
)

Variables

This section is empty.

Functions

func HostIP

func HostIP() string

func HostName

func HostName() string

func IsRunningOnWindows

func IsRunningOnWindows() bool

func OS

func OS() string

func RunningInDockerContainer deprecated

func RunningInDockerContainer() bool

Deprecated: Use dockerHelpers.IsDockerContainer()

func SystemIdentity

func SystemIdentity() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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