From 725b4a5997a42aa9ac588d55c2748cad55a84310 Mon Sep 17 00:00:00 2001 From: MrMcX Date: Mon, 27 Dec 2021 14:28:24 +0100 Subject: [PATCH] =?UTF-8?q?=E2=80=9Ecmd=E2=80=9C=20hinzuf=C3=BCgen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 cmd.md diff --git a/cmd.md b/cmd.md new file mode 100644 index 0000000..d0d020d --- /dev/null +++ b/cmd.md @@ -0,0 +1,19 @@ +# package cmd // import "proxy/cmd" +## Types + +#### type Cmd struct +``` +{ + *exec.Cmd + InWriter io.Writer + OutReader io.Reader + // Has unexported fields. +} +``` +Cmd Overloads the exec.Cmd class to save the full command and adds custom input/output pipes + +#### func Start(args string) (*Cmd, io.Reader, io.Writer) +Start creates a new cmd object with given arguments, runs and then returns it + +#### func (c *Cmd) WaitH() +WaitH runs Cmd.Wait() and catches the possible error \ No newline at end of file