zneix / haste-client

CLI utility uploading code to hastebin
GNU Affero General Public License v3.0
12 stars 3 forks source link

go.mod file not found in current directory #6

Open W1BTR opened 4 days ago

W1BTR commented 4 days ago

go get github.com/zneix/haste-client


        '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'.```
W1BTR commented 4 days ago

tried go install go get github.com/zneix/haste-client@latest but that errors out:


go install go get github.com/zneix/haste-client@latest
go: go: all arguments must refer to packages in the same module at the same version (@latest)```

```go install go@latest get@latest github.com/zneix/haste-client@latest
go: go@latest: module go@latest found (1.23.2), but does not contain package go```
W1BTR commented 4 days ago

Was able to install with:

go mod init myproject
go install github.com/zneix/haste-client@latest