Gosearch is a zsh widget that lists packages when you are trying to work with
go get
. See Description.
Imagine you started a new go project or working on an existing project and want to add some packages you already know the name of but don't know the actual address. Packages like gin, fiber, testify, json, uuid and ... . This script does exactly that. It searches for the packages by their name without exiting the terminal and opening the browser.
curl -sSfL https://raw.githubusercontent.com/itzloop/gosearch/main/install.sh | bash
Searching for go packages in the terminal
$ go get <query><Tab>
$ go get require<Tab>
$ go get misrua<Tab>
Currently, symbols aren't supported, so these WILL NOT work
# These WILL NOT work
$ go get sql.Conn<Tab>
$ go get pgx.Conn<Tab>
Depending on where you live, you might need to setup a proxy
There is the env, GOSEARCH_DEBUG_FILE
, by setting this in the shell you are working debug logs will be written to that file.
$ export GOSEARCH_DEBUG_FILE=/path/to/some/file
$ go get http<Tab>
# logs will be written to '/path/to/some/file'
- Currently symbols aren't supported, so these WILL NOT work
- Depending on where you live, you might need to setup a proxy
- It's only for zsh, so if you use another shell and like this project, submit an issue or even better a PR!
This project is only for my needs, so it's pretty limited. If you have another usecase that is not covered, feel free to submit an issue or a PR.