本文整理汇总了Golang中github.com/keybase/client/go/logger.Logger.CDebugf方法的典型用法代码示例。如果您正苦于以下问题:Golang Logger.CDebugf方法的具体用法?Golang Logger.CDebugf怎么用?Golang Logger.CDebugf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/keybase/client/go/logger.Logger
的用法示例。
在下文中一共展示了Logger.CDebugf方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: FilterTLFEarlyExitError
// FilterTLFEarlyExitError decides whether an error received while
// trying to create a TLF should result in showing the user an empty
// folder (exitEarly == true), or not.
func FilterTLFEarlyExitError(ctx context.Context, err error, log logger.Logger, name libkbfs.CanonicalTlfName) (
exitEarly bool, retErr error) {
switch err := err.(type) {
case nil:
// No error.
return false, nil
case libkbfs.WriteAccessError:
// No permission to create TLF, so pretend it's still
// empty.
//
// In theory, we need to invalidate this once the TLF
// is created, but in practice, the Linux kernel
// doesn't cache readdir results, and probably not
// OSXFUSE either.
log.CDebugf(ctx,
"No permission to write to %s, so pretending it's empty",
name)
return true, nil
case libkbfs.MDServerErrorWriteAccess:
// Same as above; cannot fallthrough in type switch
log.CDebugf(ctx,
"No permission to write to %s, so pretending it's empty",
name)
return true, nil
default:
// Some other error.
return true, err
}
}