Beispiel #1
0
// AppsList lists apps on the Deis controller.
func AppsList() error {
	c, err := client.New()

	if err != nil {
		return err
	}

	apps, err := apps.List(c)

	if err != nil {
		return err
	}

	fmt.Println("=== Apps")

	for _, app := range apps {
		fmt.Println(app.ID)
	}
	return nil
}
Beispiel #2
0
// AppsList lists apps on the Deis controller.
func AppsList(results int) error {
	c, err := client.New()

	if err != nil {
		return err
	}

	if results == defaultLimit {
		results = c.ResponseLimit
	}

	apps, count, err := apps.List(c, results)

	if err != nil {
		return err
	}

	fmt.Printf("=== Apps%s", limitCount(len(apps), count))

	for _, app := range apps {
		fmt.Println(app.ID)
	}
	return nil
}