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

Cannot go install github.com/denisenkom/go-mssqldb@latest? #73313

Closed
sheeeng opened this issue Apr 6, 2021 · 10 comments
Closed

Cannot go install github.com/denisenkom/go-mssqldb@latest? #73313

sheeeng opened this issue Apr 6, 2021 · 10 comments

Comments

@sheeeng
Copy link

sheeeng commented Apr 6, 2021

I'm following the instructions from Microsoft's documentation.

$ go version                                           
go version go1.16.3 darwin/amd64
$
$ go install -v github.com/denisenkom/go-mssqldb@latest

go install: package github.com/denisenkom/go-mssqldb is not a main package

Did I miss anything?

See also denisenkom/go-mssqldb#649.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@Oury-MSFT
Copy link
Contributor

@sheeeng We are looking into this and will get back to you

@Oury-MSFT
Copy link
Contributor

@sheeeng We tried to reproduce the issue and got the same error message.
@David-Engel Could you please suggest a workaround. I have also seen here that Go1.16 is broken. Could you also help confirm that.

@Oury-MSFT Oury-MSFT assigned David-Engel and unassigned Oury-MSFT Apr 9, 2021
@Oury-MSFT Oury-MSFT removed the cxp label Apr 9, 2021
@Oury-MSFT
Copy link
Contributor

Faced the same issue when creating go install -v github.com/denisenkom/go-mssqldb@latest

image

@David-Engel
Copy link
Contributor

@sheeeng @Oury-MSFT
Go has definitely changed. I believe the go install command is no longer necessary. Can you try continuing on with the sample, skipping the go install github.com/denisenkom/go-mssqldb command and confirm that it still works for you?

@Oury-MSFT
Copy link
Contributor

@David-Engel I have tried the code without the go install but I got this error message highlighted in yellow.
image

@David-Engel
Copy link
Contributor

I have tried the code without the go install but I got this error message highlighted in yellow.
image

@Oury-MSFT Your screenshot shows you are not running the right commands from the article. From the SqlServerSample folder (after the cd SqlServerSample command), you should only have to run:

go get github.com/denisenkom/go-mssqldb

Note: It won't produce any output.
After that, you create your sample.go file and then simply run:

go run sample.go

@sheeeng
Copy link
Author

sheeeng commented Apr 14, 2021

It works with go get and go run by skipping go install.
Should we update the documentation before closing this issue?

@Oury-MSFT
Copy link
Contributor

@David-Engel It works for me as well.

@David-Engel
Copy link
Contributor

I'll submit a PR and close this issue once it's merged.

@David-Engel
Copy link
Contributor

Doc updated. It should be reflected after the next scheduled publish.

#please-close

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

No branches or pull requests

5 participants