Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assignment mismatch: 2 variables but uuid.NewV4 returns 1 values #106

Open
barry-en opened this issue Mar 5, 2020 · 6 comments
Open

assignment mismatch: 2 variables but uuid.NewV4 returns 1 values #106

barry-en opened this issue Mar 5, 2020 · 6 comments

Comments

@barry-en
Copy link

barry-en commented Mar 5, 2020

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
)

@barry-en
Copy link
Author

barry-en commented Mar 5, 2020

import(
uuid "github.com/satori/go.uuid
)

@Wyatex
Copy link

Wyatex commented Mar 30, 2020

同样遇到这个问题,是不是这个项目已经被弃坑了

@AIDeepx
Copy link

AIDeepx commented Apr 6, 2020

不用管IDE的报错提示,直接返回一个值就可以了

@pjebs
Copy link

pjebs commented Apr 9, 2020

I got the same issue after switch to GOMODULES. It was working in GOPATH mode. godoc also says NewV4 returns 2 values.

@pjebs
Copy link

pjebs commented Apr 9, 2020

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`

@DamareYoh
Copy link

@pjebs @aidy-automan @6qiongtao its important to audit a 3rd party library carefully when including it in your software. #103 This repo has been dead for a long time, you should really use a different one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants