Interesting. But if I install and run goimports locally, it doesn't delete the import - it just rewrites it to assign the package name explicitly. Maybe the playground has a different version of goimports?
$ ~/go/bin/goimports -d .
diff -u start.go.orig start.go
--- start.go.orig 2022-11-18 18:35:27.000000000 +0000
+++ start.go 2022-11-18 18:35:27.000000000 +0000
@@ -1,8 +1,9 @@
package main
import (
- "
example.com/myprog/foo"
"fmt"
+
+ wibble "
example.com/myprog/foo"
)
func main() {