Open barry-en opened 4 years ago
import( uuid "github.com/satori/go.uuid )
同样遇到这个问题,是不是这个项目已经被弃坑了
不用管IDE的报错提示,直接返回一个值就可以了
I got the same issue after switch to GOMODULES. It was working in GOPATH mode. godoc also says NewV4
returns 2 values.
Under GOMODULES mode, it uses the tag 1.2.0 instead of master which is the latest version.
Just do this: GO111MODULE=on go get -u github.com/satori/go.uuid@master
That will add this to go.mod file:
`github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b`
@pjebs @aidy-automan @6qiongtao its important to audit a 3rd party library carefully when including it in your software. https://github.com/satori/go.uuid/issues/103 This repo has been dead for a long time, you should really use a different one.
I use go mod go mod init root@efd4d3d775f2:/home/workspace/src/test# cat go.mod module test
go 1.13
require ( github.com/dgrijalva/jwt-go v3.2.0+incompatible github.com/gin-gonic/gin v1.5.0 github.com/go-sql-driver/mysql v1.5.0 github.com/go-xorm/xorm v0.7.9 github.com/golang/protobuf v1.3.4 github.com/gomodule/redigo v2.0.0+incompatible github.com/micro/cli v0.2.0 github.com/micro/go-micro v1.18.0 github.com/micro/go-plugins/registry/consul v0.0.0-20200119172437-4fe21aa238fd github.com/pkg/errors v0.9.1 github.com/satori/go.uuid v1.2.0 )