Open Qapil-sh opened 3 years ago
same problem whats up with this?
same problem whats up with this?
I had a similar issue. You can use the following command instead:
go install github.com/tomnomnom/gf@latest
See documentation:
Starting in Go 1.17, installing executables with
go get
is deprecated.go install
may be used instead.In Go 1.18,
go get
will no longer build packages; it will only be used to add, update, or remove dependencies ingo.mod
.To install an executable in the context of the current module, use
go install
, without a version suffix, as below. This applies version requirements and other directives from thego.mod
file in the current directory or a parent directory.go install example.com/cmd
To install an executable while ignoring the current module, use
go install
with a version suffix like@v1.2.3
or@latest
, as below. When used with a version suffix,go install
does not read or update thego.mod
file in the current directory or a parent directory.# Install a specific version. go install example.com/cmd@v1.2.3
go install example.com/cmd@latest
>
> In order to avoid ambiguity, when `go install` is used with a version suffix, all arguments must refer to `main` packages in the same module at the same version. If that module has a `go.mod` file, it must not contain directives like `replace` or `exclude` that would cause it to be interpreted differently if it were the main module. The module’s `vendor` directory is not used.
>
> See [go install](https://go.dev/ref/mod#go-install) for details.
root@kali:~# go get -u github.com/tomnomnom/gf package encoding/json: unrecognized import path "encoding/json" (import path does not begin with hostname) package errors: unrecognized import path "errors" (import path does not begin with hostname) package flag: unrecognized import path "flag" (import path does not begin with hostname) package fmt: unrecognized import path "fmt" (import path does not begin with hostname) package os: unrecognized import path "os" (import path does not begin with hostname) package os/exec: unrecognized import path "os/exec" (import path does not begin with hostname) package os/user: unrecognized import path "os/user" (import path does not begin with hostname) package path/filepath: unrecognized import path "path/filepath" (import path does not begin with hostname) package strings: unrecognized import path "strings" (import path does not begin with hostname)
_PLease Help __