Sean Hoffman
Oct 20, 2021

--

There's something else amiss in the code. I just did the following in Goland (Jetbrains IDE), and debugged the individual test:

`func TestSpecial(t *testing.T ){

mylocalfunction := func(){fmt.Println("Isn't that Special!")

}

mylocalfunc() // "Isn't that Special gets printed here"

}`

So I'm not sure what else is going on, but I'm not seeing the same behaviour in Goland (which admittedly could be different than running IntelliJ with a Go plugin)

(Edit: I apologize for the formatting; I don’t quite have Medium’s code block formatting techniques mastered. I tried to come back and retroactively apply a code-block, but it just added back-ticks to what I wrote, sorry)

--

--

Sean Hoffman
Sean Hoffman

Written by Sean Hoffman

Software Developer (C++, C#, Go, others), Husband, Father. I eat fried potatoes annually on July 14th.

Responses (1)