Skip to content

Instantly share code, notes, and snippets.

@ionrock
Created January 11, 2018 17:12
Show Gist options
  • Save ionrock/13c1828641ee7e9974c1d49cd7d30819 to your computer and use it in GitHub Desktop.
Save ionrock/13c1828641ee7e9974c1d49cd7d30819 to your computer and use it in GitHub Desktop.
func CreateExecutor(cmdType string, cmdCfg CommandConfig) *CommandExecutor {
ce := &CommandExecutor{}
switch cmdType {
case "docker":
ce.Command = CreateDockerCommand(cmdCfg)
case "ssh":
ce.Command = CreateSSHCommand(cmdCfg)
}
return ce
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment