github.com/askholme/packer@v0.7.2-0.20140924152349-70d9566a6852/packer/command_test.go (about) 1 package packer 2 3 type TestCommand struct { 4 runArgs []string 5 runCalled bool 6 runEnv Environment 7 } 8 9 func (tc *TestCommand) Help() string { 10 return "bar" 11 } 12 13 func (tc *TestCommand) Run(env Environment, args []string) int { 14 tc.runCalled = true 15 tc.runArgs = args 16 tc.runEnv = env 17 return 0 18 } 19 20 func (tc *TestCommand) Synopsis() string { 21 return "foo" 22 }