Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Publish = &gcmd.Command{ Name: "publish", Usage: "publish", Brief: "publish files", Examples: `publish -h // get help information publish -f "config-example.yaml:config.yaml" publish -d "sourceDir:dstDir" publish -f "config-example.yaml:config.yaml" --force publish -f "config-example.yaml:config.yaml" -p `, Arguments: []gcmd.Argument{ {Name: "dir", Short: "d", Brief: "publish dir parameters, the format is 'src:dst', the target address can only be the project directory"}, {Name: "file", Short: "f", Brief: "publish file parameters, the format is 'src:dst', the target address can only be the project directory"}, {Name: "force", Brief: "replace if the target file exists, skip by default", Orphan: true}, {Name: "print", Short: "p", Brief: "show print information", Orphan: true}, }, Func: func(ctx context.Context, parser *gcmd.Parser) (err error) { if len(parser.GetOptAll()) == 0 { gcmd.CommandFromCtx(ctx).Print() return nil } logger = glog.New() force = parser.GetOpt("force") != nil showPrint = parser.GetOpt("print") != nil if !showPrint { logger.SetLevel(glog.LEVEL_CRIT) } return publishHandler(ctx, parser) }, } )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.