当前位置: 首页>>代码示例>>Golang>>正文


Golang Logger.CDebugf方法代码示例

本文整理汇总了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
	}
}
开发者ID:keybase,项目名称:kbfs-beta,代码行数:35,代码来源:tlf.go


注:本文中的github.com/keybase/client/go/logger.Logger.CDebugf方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。