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 #100

Open
chingiz2387 opened this issue Sep 13, 2019 · 4 comments
Open

Comments

@chingiz2387
Copy link

Hello everyone, I started experimenting with mod. When I initialize the modules in my project, all libraries are loaded and github.com/satori/go.uuid is loaded accordingly.. But when starting go run server.go, I get an error {
"resource": "/d:/myProject/oauth/tokenstore/tokenstore.go",
"owner": "generated_diagnostic_collection_name#0",
"severity": 8,
"message": "cannot initialize 2 variables with 1 values",
"source": "LSP",
"startLineNumber": 41,
"startColumn": 20,
"endLineNumber": 41,
"endColumn": 30
}

image

I am using vscode.

My project is outside gopath

@rajmaniar
Copy link

I struggled with this today before I realized the api for NewV4 at the latest semver tag v1.2.0 has one return variable but the head of master branch on the repo has two.
https://github.com/satori/go.uuid/blob/v1.2.0/generator.go#L64
vs
https://github.com/satori/go.uuid/blob/master/generator.go#L68

go modules will always try to collect the latest semver tag by default so you need to do something like:
go get -u github.com/satori/go.uuid@master

@3013216027
Copy link

Same to me, the default behavior of go mod confuse with the old tag.
I wonder if it's possible to add a new version tag :)

@cameracker
Copy link

@chingiz2387 @3013216027 @rajmaniar this package is obsolete. #84

Recommend using https://github.com/gofrs/uuid

@3013216027
Copy link

@CameronAckermanSEL thks, I've moved to https://github.com/google/uuid instead

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

4 participants