Documentation ¶
Index ¶
- Variables
- func Cat(filename string) string
- func Chomp(a interface{}) string
- func Daemon(cmdline string, timeout time.Duration) int
- func Dir(dirname string) bool
- func Exec(cmdline string)
- func Execname(filename string) string
- func Exists(filename string) bool
- func GetComm(pid int) (string, error)
- func GetPPID(pid int) (int, error)
- func InitCallback(f func(interface{}, int))
- func Int(s string) int
- func Int64(s string) int64
- func IsDir(dirname string) bool
- func Md5sum(filename string) string
- func Mkdir(dir string) bool
- func NewRun(workingpath string, cmd []string) error
- func OpenBrowser(url string) error
- func Path(filename string) string
- func Quiet(q bool)
- func RM(filename string)
- func RemoveFirstElement(slice []string) (string, []string)
- func Run(args []string) bool
- func RunCmd(workingpath string, parts []string) (error, bool, string)
- func RunCmdRun(workingpath string, parts []string) error
- func RunString(args string) bool
- func Script(cmds string) int
- func SetDelayInMsec(msecs int)
- func SetStderr(newerr *os.File)
- func SetStdout(newout *os.File)
- func Shell() string
- func SpewOn()
- func Terminal() string
- func TestTerminalColor()
- func Unlink(filename string)
- func UseJournalctl()
- func Wget(url string) *bytes.Buffer
- func WgetToFile(filepath string, url string) error
- func Write(filepath string, data string) bool
- func XtermCmd(path string, cmd []string)
- func XtermCmdBash(path string, cmd []string)
- func XtermCmdWait(path string, cmd []string)
- type File
- type OldShell
- type RunResult
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Exec ¶
func Exec(cmdline string)
run something and never return from it TODO: pass STDOUT, STDERR, STDIN correctly TODO: figure out how to nohup the process and exit
func OpenBrowser ¶
openBrowser opens the specified URL in the default browser of the user.
func RemoveFirstElement ¶
this is stuff from a long time ago that there must be a replacement for
func RunCmd ¶
send the path and the command
func RunCmdRun ¶
send the path and the command
func SpewOn ¶
func SpewOn()
func Terminal ¶
func Terminal() string
returns a string of the xterm the user is using for example, "xterm" or "mate-terminal"
func TestTerminalColor ¶
func TestTerminalColor()
what genius figured this out? originally from github.com/dimasma0305/GoFetch
func UseJournalctl ¶
func UseJournalctl()
func Write ¶
write out a file. Always be nice and end with '\n' if you are here and want to complain about ending in '\n' then you probably aren't going to like lots of things in this package. I will quote the evilwm man page:
BUGS: The author's idea of friendly may differ to that of many other people.
func XtermCmd ¶
spawns an xterm with something you can run at a command line
func XtermCmdBash ¶
spawns an xterm with something you can run at a command line then executes bash
Types ¶
type File ¶
type OldShell ¶
type OldShell struct { Cmdline string Process *exec.Cmd Done bool Quiet bool Fail bool Error error Buffer *bytes.Buffer // which names are really better here? // for now I init them both to test out // how the code looks and feels STDOUT *File STDERR *File Stdout *File Stderr *File }
early code playground