本文整理匯總了Golang中github.com/keybase/client/go/logger.Logger.Info方法的典型用法代碼示例。如果您正苦於以下問題:Golang Logger.Info方法的具體用法?Golang Logger.Info怎麽用?Golang Logger.Info使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/keybase/client/go/logger.Logger
的用法示例。
在下文中一共展示了Logger.Info方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: ShowStatus
// ShowStatus shows status info for a service
func ShowStatus(label string, log logger.Logger) error {
service := NewService(label)
service.SetLogger(log)
status, err := service.LoadStatus()
if err != nil {
return err
}
if status != nil {
log.Info("%s", status.Description())
} else {
log.Info("No service found with label: %s", label)
}
return nil
}
示例2: ShowServices
// ShowServices outputs keybase service info.
func ShowServices(filters []string, name string, log logger.Logger) (err error) {
services, err := ListServices(filters)
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
}