You always need a go.mod file if you are importing other modules. But if 
you're not publishing your code, you can name your own module however you 
like: "go mod init example" is fine.

On Monday, 18 September 2023 at 11:27:09 UTC+1 Aadi Sharma wrote:

> I am using go-redis package and can not use it's any version without mod 
> file.
> Do golang does not allow us to  use this package without mod file ? 
> I use  
> . github.com/go-redis/redis/v8 ,  go get github.com/go-redis/redis and 
> github.com/go-redis/redis/v9
>  but with none of these three comands i was not able to import the redis 
> package.
> On the other hand i  use to import this package with the presence of mod 
> file and
> it get's imported.
> How to use this package without any mod file....
>
>
>
> With regards
> Aadi
>

-- 
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/a53ed8a6-562f-48d2-9c21-3876ac61f277n%40googlegroups.com.

Reply via email to