github.com/liamawhite/cli-with-i18n@v6.32.1-0.20171122084555-dede0a5c3448+incompatible/command/v2/scale_command.go (about)

     1  package v2
     2  
     3  import (
     4  	"os"
     5  
     6  	"github.com/liamawhite/cli-with-i18n/cf/cmd"
     7  	"github.com/liamawhite/cli-with-i18n/command"
     8  	"github.com/liamawhite/cli-with-i18n/command/flag"
     9  )
    10  
    11  type ScaleCommand struct {
    12  	RequiredArgs    flag.AppName `positional-args:"yes"`
    13  	ForceRestart    bool         `short:"f" description:"Force restart of app without prompt"`
    14  	NumInstances    int          `short:"i" description:"Number of instances"`
    15  	DiskLimit       string       `short:"k" description:"Disk limit (e.g. 256M, 1024M, 1G)"`
    16  	MemoryLimit     string       `short:"m" description:"Memory limit (e.g. 256M, 1024M, 1G)"`
    17  	usage           interface{}  `usage:"CF_NAME scale APP_NAME [-i INSTANCES] [-k DISK] [-m MEMORY] [-f]"`
    18  	relatedCommands interface{}  `related_commands:"push"`
    19  }
    20  
    21  func (ScaleCommand) Setup(config command.Config, ui command.UI) error {
    22  	return nil
    23  }
    24  
    25  func (ScaleCommand) Execute(args []string) error {
    26  	cmd.Main(os.Getenv("CF_TRACE"), os.Args)
    27  	return nil
    28  }