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

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u010918487/article/details/89331057

 不知道是不是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

就解决了这个问题

猜你喜欢

转载自blog.csdn.net/u010918487/article/details/89331057