go build提示Usage信息,附带一行vendor信息

2 篇文章 0 订阅

 不知道是不是vendor的问题,今天添加了json-iterator这个库,go build以后就这样了

go build main.go
# jlweb/vendor/github.com/json-iterator/go
usage: compile [options] file.go...
  -%    debug non-static initializers
  -+    compiling runtime
  -B    disable bounds checking
  -C    disable printing of columns in error messages
  -D path
        set relative path for local imports
  -E    debug symbol export
  -I directory
        add directory to import search path
  -K    debug missing line numbers
  -L    show full file names in error messages
  -N    disable optimizations
  -S    print assembly listing
  -V    print version and exit
  -W    debug parse tree after type checking
  -allabis
        generate ABI wrappers for all symbols (for bootstrap)
  -asmhdr file
        write assembly header to file
  -bench file
        append benchmark times to file
  .....

怀疑是公司加密软件导致的问题。

 

解决

根据提示的vendor信息我新加入的github.com/json-iterator/go有问题,移除了该github.com/json-iterator/go,重新进行go build没问题。

手动删了vendor.json里面的github.com/json-iterator/go配置,删了vendor里面的github.com/json-iterator/go代码,后来重新执行

govendor add github.com/json-iterator/go

就解决了这个问题

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值