github.com/ablease/cli@v6.37.1-0.20180613014814-3adbb7d7fb19+incompatible/command/v2/create_buildpack_command.go (about) 1 package v2 2 3 import ( 4 "code.cloudfoundry.org/cli/command" 5 "code.cloudfoundry.org/cli/command/flag" 6 "code.cloudfoundry.org/cli/command/translatableerror" 7 ) 8 9 type CreateBuildpackCommand struct { 10 RequiredArgs flag.CreateBuildpackArgs `positional-args:"yes"` 11 Disable bool `long:"disable" description:"Disable the buildpack from being used for staging"` 12 Enable bool `long:"enable" description:"Enable the buildpack to be used for staging"` 13 usage interface{} `usage:"CF_NAME create-buildpack BUILDPACK PATH POSITION [--enable|--disable]\n\nTIP:\n Path should be a zip file, a url to a zip file, or a local directory. Position is a positive integer, sets priority, and is sorted from lowest to highest."` 14 relatedCommands interface{} `related_commands:"buildpacks, push"` 15 } 16 17 func (CreateBuildpackCommand) Setup(config command.Config, ui command.UI) error { 18 return nil 19 } 20 21 func (c CreateBuildpackCommand) Execute(args []string) error { 22 _, err := flag.ParseStringToInt(c.RequiredArgs.Position) 23 if err != nil { 24 return translatableerror.ParseArgumentError{ 25 ArgumentName: "POSITION", 26 ExpectedType: "integer", 27 } 28 } 29 30 return translatableerror.UnrefactoredCommandError{} 31 }