I have imported several packages into a file in a Go package (
package commands) I am writing (following along with a golang tutorial) using Vim with the Vim-Go plugin. Several of these packages are not yet used in the package. When I save the file
:w, Vim seems to be deleting the unused packages, which is really annoying because those unused packages are going to be used. I just haven't added the necessary code for them. Is there a way to turn off this functionality in Vim-Go or do I have to delete the whole plugin to get rid of this annoying behavior?
package commands import ( "fmt" "os" "time" rss "github.com/jteeuwen/go-pkg-rss" "github.com/spf13/cobra" "github.com/spf13/viper" )
import ( "github.com/spf13/cobra" "github.com/spf13/viper" )