内容简介:下载zap库的时候报错而且引用包的时候
下载zap库的时候
go get -u github.com/uber-go/zap
报错
package github.com/uber-go/zap: code in directory D:\GoSpace2019\src\github.com\uber-go\zap expects import "go.uber.org/zap"
而且引用包的时候
import ( "github.com/uber-go/zap" )
报错
'github.com/uber-go/zap' imports package that expects import "go.uber.org/zap"
查看zap的源码,发现作者开发它时的工程目录本来就是 "go.uber.org/zap",只是它的代码发布到git的目录是github.com/uber-go/zap而已
解决方案
在GOPATH/src下新建"go.uber.org/zap"文件夹,然后将代码拷贝过去。引用包也改为:
import ( "go.uber.org/zap" )
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:- Golang学习笔记之错误处理error、panic (抛出错误),recover(捕获错误)
- c – 构建PBRT v2错误 – 错误1错误U1077:’if’:返回代码’0x1′
- !错误!在 Android 下这么用 ShowModal 是错误的!
- Google开源ClusterFuzz:使得查找错误并修复错误变得异常简单
- 脚本错误量极致优化-定位压缩且无 SourceMap 文件的脚本错误
- php – 解析错误:语法错误,意外’未设置'(T_UNSET)
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
About Face 2.0
Alan Cooper、Robert M. Reimann / Wiley / March 17, 2003 / USD 35.00
First published seven years ago-just before the World Wide Web exploded into dominance in the software world-About Face rapidly became a bestseller. While the ideas and principles in the original book......一起来看看 《About Face 2.0》 这本书的介绍吧!