github.com/liamawhite/cli-with-i18n@v6.32.1-0.20171122084555-dede0a5c3448+incompatible/command/v2/copy_source_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 CopySourceCommand struct {
    12  	RequiredArgs        flag.CopySourceArgs `positional-args:"yes"`
    13  	NoRestart           bool                `long:"no-restart" description:"Override restart of the application in target environment after copy-source completes"`
    14  	Organization        string              `short:"o" description:"Org that contains the target application"`
    15  	Space               string              `short:"s" description:"Space that contains the target application"`
    16  	usage               interface{}         `usage:"CF_NAME copy-source SOURCE_APP TARGET_APP [-s TARGET_SPACE [-o TARGET_ORG]] [--no-restart]"`
    17  	relatedCommands     interface{}         `related_commands:"apps, push, restart, target"`
    18  	envCFStagingTimeout interface{}         `environmentName:"CF_STAGING_TIMEOUT" environmentDescription:"Max wait time for buildpack staging, in minutes" environmentDefault:"15"`
    19  	envCFStartupTimeout interface{}         `environmentName:"CF_STARTUP_TIMEOUT" environmentDescription:"Max wait time for app instance startup, in minutes" environmentDefault:"5"`
    20  }
    21  
    22  func (CopySourceCommand) Setup(config command.Config, ui command.UI) error {
    23  	return nil
    24  }
    25  
    26  func (CopySourceCommand) Execute(args []string) error {
    27  	cmd.Main(os.Getenv("CF_TRACE"), os.Args)
    28  	return nil
    29  }