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() { On Friday, 18 November 2022 at 18:29:01 UTC Jan Mercl wrote: > On Fri, Nov 18, 2022 at 7:15 PM Brian Candler <b.ca...@pobox.com> wrote: > > > This used to work: > > https://play.golang.org/p/YQoAu1Iwkor > > > > But now when I click on "Run", the import path of " > example.com/myprog/foo" is removed, and it fails to compile. > > > > Any clues as to what's going on? > > I think the playground uses goimports. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/2250c479-bcad-4736-b030-de1bc275f059n%40googlegroups.com.