uuid
uuid copied to clipboard
not able to install uuid package
RUN go install github.com/google/[email protected] or RUN go install github.com/google/uuid running these command but getting such error, RUN go install github.com/google/[email protected]: #10 0.943 go: downloading github.com/google/uuid v1.3.0 #10 2.980 package github.com/google/uuid is not a main package
executor failed running [/bin/sh -c go install github.com/google/[email protected]]: exit code: 1
please give me some solution for same
This library is not command.
So, You should do go get github.com/google/uuid
The Readme also says so. https://github.com/google/uuid#readme
When I use go get-- I get an error: $go get github.com/google/uuid 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'.
go version go1.18 linux/amd64 on Ubuntu 2004
Don't use get or install, Just import github/google/uuid in the file, it will work
On Mon, 11 Apr, 2022, 11:26 pm andymend, @.***> wrote:
When I use go get-- I get an error: $go get github.com/google/uuid 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 @.***' For more information, see https://golang.org/doc/go-get-install-deprecation or run 'go help get' or 'go help install'.
go version go1.18 linux/amd64 on Ubuntu 2004
— Reply to this email directly, view it on GitHub https://github.com/google/uuid/issues/99#issuecomment-1095357076, or unsubscribe https://github.com/notifications/unsubscribe-auth/AISUBWQ3C2VZJPCBBURCKZDVERRURANCNFSM5RUAM7FQ . You are receiving this because you authored the thread.Message ID: @.***>
Don't use get or install, Just import github/google/uuid in the file, it will work
This does not work, the package needs to be installed otherwise it cannot be found and it can't be installed because it is not a main package
When I use go get-- I get an error:
$go get github.com/google/uuid 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'. go version go1.18 linux/amd64 on Ubuntu 2004
I was having the same problem and I discovered that u have to init a module so I run go mod init and go get github.com/google/uuid works good for me (I'm learning so do not judge me please 😂)