You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
garble/testdata/scripts/syntax.txt

38 lines
426 B
Plaintext

garble build main.go
exec ./main
cmp stderr main.stderr
-- main.go --
package main
import (
"encoding/json"
"go/ast"
)
var V interface{}
type T struct {
ast.Node
*ast.Ident
}
type EncodingT struct {
Foo int
}
func main() {
switch V := V.(type) {
case int:
var _ int = V
case nil:
println("nil case")
}
enc, _ := json.Marshal(EncodingT{Foo: 3})
println(string(enc))
}
-- main.stderr --
nil case
{"Foo":3}