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.
53 lines
667 B
Plaintext
53 lines
667 B
Plaintext
garble build main.go
|
|
exec ./main
|
|
cmp stderr main.stderr
|
|
|
|
! binsubstr main$exe 'valuable information'
|
|
|
|
-- main.go --
|
|
package main
|
|
|
|
import (
|
|
"encoding/json"
|
|
"go/ast"
|
|
)
|
|
|
|
// This comment contains valuable information. Ensure it's not in the final binary.
|
|
var V interface{}
|
|
|
|
type T struct {
|
|
ast.Node
|
|
*ast.Ident
|
|
}
|
|
|
|
type EncodingT struct {
|
|
Foo int
|
|
}
|
|
|
|
type Embedded int
|
|
|
|
type Embedding struct {
|
|
Embedded
|
|
}
|
|
|
|
type embedded int
|
|
|
|
type embedding struct {
|
|
embedded
|
|
}
|
|
|
|
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}
|