prog

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProgInfo

type ProgInfo struct {
	// contains filtered or unexported fields
}

ProgInfo returns information about the running program.

func Prog

func Prog() *ProgInfo

func (*ProgInfo) Args

func (p *ProgInfo) Args() []string

Args returns a slice of the program arguments

func (*ProgInfo) Avail

func (p *ProgInfo) Avail(progName string) string

Avail returns full path of binary name if available

func (*ProgInfo) Err

func (p *ProgInfo) Err() error

Err returns the last generated error from a method call

func (*ProgInfo) Exit

func (p *ProgInfo) Exit(code int, msgs ...string)

Exit prints messages and exits current program

func (*ProgInfo) Name

func (p *ProgInfo) Name() string

Name of executable running

func (*ProgInfo) Path

func (p *ProgInfo) Path() string

Path of running program

func (*ProgInfo) Pid

func (p *ProgInfo) Pid() int

Pid program's process id

func (*ProgInfo) Ppid

func (p *ProgInfo) Ppid() int

Ppid program's parent process id

func (*ProgInfo) Workdir

func (p *ProgInfo) Workdir() string

Workdir returns the working directory

Jump to

Keyboard shortcuts

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