Was writing my reply then Jan beat me lol, anyway he didn't linked the
tutorial soo...
https://golang.org/doc/tutorial/getting-started
On Friday, 7 May 2021 at 9:21:29 pm UTC+8 [email protected] wrote:
> hi,
>
> I am struggling with the new go version.
>
> I have a simple script that imports a github module, and before (don't
> know which go version) I could just run:
>
> go get github/user/module
>
> and then in my crappy script I could
>
> package main
> import github.com/user/module
>
> func main() {
> p := module.New()
> p.run(whatever)
> }
>
> but this now exits with the error:
> no required module provides package github.com/user/module: go.mod file
> not found in current directory or any parent directory; see 'go help
> modules'
>
> I do not want to write a module, I just want to use a module. So how do I
> do this? I am reading all the tutorials listed on the go help modules
> output, but at this point I do not need to write a module.
>
> A bit confused. I am obviously doing it wrong, but I cannot understand why.
>
> Any help greatly appreciated.
>
> Regards,
> Natxo
>
>
>
>
>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/f1435504-efc7-4455-aa42-277efc1a7f6cn%40googlegroups.com.