func NewCommand(cmd string, options ...func(*Command)) *Command {
	c := &Command{
		Command:  cmd,
		Timeout:  30 * time.Minute,
		executed: false,
		Env:      []string{},
	}
	c.StdoutWriter = io.MultiWriter(&c.stdout, &c.combined)
	c.StderrWriter = io.MultiWriter(&c.stderr, &c.combined)
	for _, o := range options {
		o(c)
	}
	return c
}
NewCommand creates a new command
You can add option with variadic option argument
Default timeout is set to 30 minutes

Example:
c := cmd.NewCommand("echo hello", function (c *Command) {
c.WorkingDir = "/tmp"
})
c.Execute()

or you can use existing options functions

c := cmd.NewCommand("echo hello", cmd.WithStandardStreams)
c.Execute()
package cmd
import (
	"bytes"
	"fmt"
	"io"
	"os"
	"os/exec"
	"syscall"
	"time"
)
type Command struct {
	Command      string
	Env          []string
	Dir          string
	Timeout      time.Duration
	StderrWriter io.Writer
	StdoutWriter io.Writer
	WorkingDir   string
	executed     bool
	exitCode     int
	stderr   bytes.Buffer
	stdout   bytes.Buffer
	combined bytes.Buffer
}
type EnvVars map[string]string