Bit #41
To remove a package in a Go project:
-
Run
go get
and postfix the package path with@none
. -
Remove all references to the package in your code, then run
go mod tidy
, which will automatically remove any unused packages from your go.mod and go.sum files.