go-imports package Auto import Go packages using goimports tool Prerequisite Install goimports if it is not installed go get -v golang.org/x/tools/cmd/goimports Usage Using command palette cmd-shift-p, search for Go Imports: Process or using keybinding ctrl-shift-i.