// ShowServices ouputs keybase service info. func ShowServices(filter string, name string) (err error) { services, err := ListServices(filter) if err != nil { return } if len(services) > 0 { log.Info("%s %s:", name, libkb.Pluralize(len(services), "service", "services", false)) for _, service := range services { log.Info(service.StatusDescription()) } log.Info("") } else { log.Info("No %s services.\n", name) } return }
// ShowServices outputs keybase service info. func ShowServices(filters []string, name string, out io.Writer) (err error) { services, err := ListServices(filters) if err != nil { return } if len(services) > 0 { fmt.Fprintf(out, "%s %s:\n", name, libkb.Pluralize(len(services), "service", "services", false)) for _, service := range services { fmt.Fprintf(out, "%s\n", service.StatusDescription()) } fmt.Fprintf(out, "\n") } else { fmt.Fprintf(out, "No %s services.\n\n", name) } return }