github.com/yunabe/lgo@v0.0.0-20190709125917-42c42d410fdf/converter/testdata/comments.golden (about) 1 package lgo_exec 2 3 // fn does nothing 4 func fn() { 5 6 } 7 // MyType represents something 8 type MyType struct { 9 Name string // name 10 Age int // age 11 } 12 // Hello returns a hello message 13 func (m *MyType) Hello() string { 14 return "Hello " + m.Name 15 } 16 type MyInterface interface { 17 // DoSomething does something 18 DoSomething(x int) float32 19 Hello() string // Say hello 20 } 21 func lgo_init() { 22 x = 10 23 y = "hello" 24 25 alice = &MyType{"Alice", 12} 26 bob = &MyType{"Bob", 45} 27 i = alice 28 j = bob 29 } 30 const ( 31 c = "constant" // This is constant 32 // d is also constant 33 d = 123 34 ) 35 var ( 36 x int 37 38 y string 39 alice *MyType 40 bob *MyType 41 42 i interface{} 43 j interface{} 44 )