go: Add a few basic test cases

From https://gobyexample.com/
go: Report tag scope
go: Drop use of setjmp()/longjmp()

This makes the code more straightforward to read and simplifies
resources management.