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/implement.txt

29 lines
460 B
Plaintext

garble build main.go
exec ./main
cmp stdout main.stdout
! bingrep main$exe 'unexportedMethod'
-- main.go --
package main
import "fmt"
type T string
func (t T) String() string {
return "String method for " + string(t)
}
func (t T) unexportedMethod() string {
return "unexported method for " + string(t)
}
func main() {
fmt.Println(T("foo"))
fmt.Println(T("foo").unexportedMethod())
}
-- main.stdout --
String method for foo
unexported method for foo