Hi again, I think I have found of a bug of go & gofmt.
On Tuesday, June 6, 2017 at 5:47:23 PM UTC-4, Tong Sun wrote: > > > How to save the file handle into struct? > > So in this file, > https://play.golang.org/p/SWnJ4TZyTu > > If I change line 34 "ft.f" to just "f", it will at least pass gofmt. Else, > I'll get > > 34:5: expected identifier on left side of := > > > However, what if I want to save the opened file handle into struct? > So, Here is the update version. 1. https://play.golang.org/p/txOIO1riwd 2. https://play.golang.org/p/_Qk9n0mZPM The two version only differ on line 26 & 29. However, the second one will get the following while trying to do *gofmt*: 29:2: expected identifier on left side of := And get this when trying to *run*: main.go:29: non-name ft.f on left side of := The minor tweak on line 26 & 29 should not cause the runable program to break, would it? Thanks -- 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. For more options, visit https://groups.google.com/d/optout.