OLD | NEW |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package main | 5 package main |
6 | 6 |
7 import "fmt" | 7 import "fmt" |
8 | 8 |
9 type testType struct { a int; b string } | 9 type testType struct { |
| 10 » a int |
| 11 » b string |
| 12 } |
10 | 13 |
11 func (t *testType) String() string { | 14 func (t *testType) String() string { |
12 return fmt.Sprint(t.a) + " " + t.b | 15 return fmt.Sprint(t.a) + " " + t.b |
13 } | 16 } |
14 | 17 |
15 func main() { | 18 func main() { |
16 » t := &testType{77, "Sunset Strip"}; | 19 » t := &testType{77, "Sunset Strip"} |
17 fmt.Println(t) | 20 fmt.Println(t) |
18 } | 21 } |
OLD | NEW |