Esempio n. 1
0
File: ps.go Progetto: rsackler/deis
func psList(argv []string) error {
	usage := `
Lists processes servicing an application.

Usage: deis ps:list [options]

Options:
  -a --app=<app>
    the uniquely identifiable name for the application.
  -l --limit=<num>
    the maximum number of results to display, defaults to config setting
`

	args, err := docopt.Parse(usage, argv, true, "", false, true)

	if err != nil {
		return err
	}

	results, err := responseLimit(safeGetValue(args, "--limit"))

	if err != nil {
		return err
	}

	return cmd.PsList(safeGetValue(args, "--app"), results)
}
Esempio n. 2
0
File: ps.go Progetto: laurrentt/deis
func psList(argv []string) error {
	usage := `
Lists processes servicing an application.

Usage: deis ps:list [options]

Options:
  -a --app=<app>
    the uniquely identifiable name for the application.
`

	args, err := docopt.Parse(usage, argv, true, "", false, true)

	if err != nil {
		return err
	}

	return cmd.PsList(safeGetValue(args, "--app"))
}