prog

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2022 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 Info added in v0.1.1

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

Info returns information about the running program.

func Prog

func Prog() *Info

Prog is a constructor function that returns *Info

func (*Info) Args added in v0.1.1

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

Args returns a slice of the program arguments

func (*Info) Avail added in v0.1.1

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

Avail returns full path of binary name if available

func (*Info) Err added in v0.1.1

func (p *Info) Err() error

Err returns the last generated error from a method call

func (*Info) Exit added in v0.1.1

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

Exit prints messages and exits current program

func (*Info) Name added in v0.1.1

func (p *Info) Name() string

Name of executable running

func (*Info) Path added in v0.1.1

func (p *Info) Path() string

Path of running program

func (*Info) Pid added in v0.1.1

func (p *Info) Pid() int

Pid program's process id

func (*Info) Ppid added in v0.1.1

func (p *Info) Ppid() int

Ppid program's parent process id

func (*Info) Workdir added in v0.1.1

func (p *Info) 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