Skip to content

Instantly share code, notes, and snippets.

@jasonmccallister
Last active March 30, 2020 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonmccallister/16956dccf7fc3e54eba88e4c8649b411 to your computer and use it in GitHub Desktop.
Save jasonmccallister/16956dccf7fc3e54eba88e4c8649b411 to your computer and use it in GitHub Desktop.
func run(r command.Runner, p command.Preparer) error {
args, err := p.Prepare()
if err != nil {
return err
}
if p.HasInput() {
if err := r.SetInput(p.GetInput()); err != nil {
return err
}
}
return r.Run(args)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment