func()

in cli/commands/activity.go [63:80]


func (cmd *Activity) Run(scope scope.Scope, c *cli.Context) {
	if err := net.VerifyLoginURL(cmd.network); err != nil {
		error_handler.ErrorExit(err)
	}
	if c.NumFlags() > 0 && c.FlagNames()[0] == "children" {
		cmd.listchildren(c.StringSlice("children")[0])
	} else {
		if c.Args().Present() {
			cmd.show(c.Args().First())
		} else {
			if scope.Activity == "" {
				cmd.list(scope.Application, scope.Entity)
			} else {
				cmd.listchildren(scope.Activity)
			}
		}
	}
}