util

package
v4.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Util added in v0.1.5

type Util struct{}

func (*Util) CommandLineArgumentExists added in v0.1.5

func (c *Util) CommandLineArgumentExists(f string) bool

checks if the command line argument exists (case-sensitive)

func (*Util) Getenv added in v0.1.5

func (c *Util) Getenv(key string, fallback string) string

checks if an environment variable exists and if not assigns a default value

func (*Util) GetenvFile added in v0.1.5

func (c *Util) GetenvFile(path string, fallback string) string

checks if a file containing an environment variable exists and if not assigns a default value

func (*Util) ReadFile added in v0.1.5

func (c *Util) ReadFile(path string) (string, error)

reads a file if it exists and returns the content of the file

func (*Util) Run added in v0.1.5

func (c *Util) Run(bin string, params []string) (string, error)

run an external program and return output

func (*Util) WriteFile added in v0.1.5

func (c *Util) WriteFile(path string, txt string) error

writes contents to a file

Jump to

Keyboard shortcuts

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