Ejemplo n.º 1
0
func ListExisting(do *definitions.Do) error {
	logger.Debugln("Asking Docker Client for the Existing Containers.")
	if do.Quiet {
		do.Result = strings.Join(util.ServiceContainerNames(true), "\n")
		if len(do.Args) != 0 && do.Args[0] != "testing" {
			logger.Printf("%s\n", "\n")
		}
	} else {
		perform.PrintTableReport("service", true) // TODO: return this as a string.
	}
	return nil
}
Ejemplo n.º 2
0
func ListExisting(do *definitions.Do) error {
	if do.Quiet {
		do.Result = strings.Join(util.ChainContainerNames(true), "\n")
		if len(do.Args) != 0 && do.Args[0] != "testing" {
			logger.Printf("%s\n", "\n")
		}
	} else {
		logger.Debugf("ListExistingRaw:PrintTable =>\t%s:%v\n", "chain", true)
		perform.PrintTableReport("chain", true)
	}

	return nil
}