Source file
test/abi/struct_3_string_input.go
1
2
3
4
5
6
7
8
9
10
11
12 package main
13
14 import (
15 "fmt"
16 )
17
18 var sink *string
19
20 type toobig struct {
21 a, b, c string
22 }
23
24
25
26 func H(x toobig) string {
27 return x.a + " " + x.b + " " + x.c
28 }
29
30 func main() {
31 s := H(toobig{"Hello", "there,", "World"})
32 gotVsWant(s, "Hello there, World")
33 }
34
35 func gotVsWant(got, want string) {
36 if got != want {
37 fmt.Printf("FAIL, got %s, wanted %s\n", got, want)
38 }
39 }
40
View as plain text