There we go! It is now working thanks alot guys. On Tuesday, April 13, 2021 at 10:57:22 AM UTC+1 Jan Mercl wrote:
> On Tue, Apr 13, 2021 at 11:40 AM Tenjin <jdiscord...@gmail.com> wrote: > > > So I am using WSL2 to develop using golang but for some reason I am > unable to use other peoples packages. > > For example: I am wanting to use the sql driver > https://github.com/go-sql-driver/mysql I am able to go get it and it says > it is downloading then it downloads but when I go to use it in my project > it just says there is no go mod file, so I was going to use that to manage > packages but when I run "go init" it just says initializing git repo and > then does not create a go mod file. > > I do not mind which way I have to use to get the driver working I just > need to get it working. One more thing, I cannot install any packages its > not just the sql driver. > > In your module directory: > > $ go mod init example.com/foo/bar > $ go mod tidy > $ GO111MODULE=on go build -v -x > > The last line just verifies if it works and should possibly reveal why, if > not. > > > Here is my gopath: /home/<username>/go > > In your setup the value of $GOPATH should not matter. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/04f69743-8cfa-4e05-bd9d-eeb284d412e0n%40googlegroups.com.