code: func runProgram(env Env, timeout time.Duration, pgm string, args ...string) ([]byte, error) {
  	if env == nil {
  		return nil, fmt.Errorf("<%s, %v>: nil env provided", pgm, args)
  	}
  
  	ctx, cancel := context.WithTimeout(context.Background(), timeout)
  	defer cancel()
  	cmd := exec.CommandContext(ctx, pgm, args...)
  	cmd.Env = flattenEnv(env)
  	stdErr := &bytes.Buffer{}
  	cmd.Stderr = stdErr
  
  	out, err := cmd.Output()
  
  	if ctx.Err() == context.DeadlineExceeded {
  		err = fmt.Errorf("timed out after %s", timeout)
  	}
  
  	if err != nil {
  		return nil,
  			fmt.Errorf(
  				"command <%s %s>: failed with error: \"%s\"\n%s",
  				pgm,
  				strings.Join(args, " "),
  				err,
  				string(stdErr.Bytes()))
  	}
  	return out, nil
  }
docs: //runProgram non-nil Env, timeout (typically secs or millisecs), program name and args