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

Please update documentation (installation - go get -u github.com/go-sql-driver/mysql fails for newer go versions) #1521

Closed
cornellb opened this issue Dec 7, 2023 · 1 comment

Comments

@cornellb
Copy link

cornellb commented Dec 7, 2023

Issue description

If you try to install the driver as documented in the installation, it fails (if you have a newer go version).

Example code

~/go go get -u github.com/go-sql-driver/mysql                                                                                                 
go: go.mod file not found in current directory or any parent directory.
	'go get' is no longer supported outside a module.
	To build and install a command, use 'go install' with a version,
	like 'go install example.com/cmd@latest'
	For more information, see https://golang.org/doc/go-get-install-deprecation
	or run 'go help get' or 'go help install'.

Error log

See above

Configuration

⋊> ~/go go version
go version go1.21.5 darwin/amd64

@methane
Copy link
Member

methane commented Dec 8, 2023

You need to go mod init.
It is "How to start your go project", not "How to use go-mysql-driver".
That's why our README doesn't contain it.

@methane methane closed this as completed Dec 8, 2023
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

2 participants