Rob Pike | bb57a5b | 2008-06-16 15:18:10 -0700 | [diff] [blame] | 1 | // $G $D/$F.go && $L $F.$A && ./$A.out |
| 2 | |
| 3 | // Copyright 2009 The Go Authors. All rights reserved. |
| 4 | // Use of this source code is governed by a BSD-style |
| 5 | // license that can be found in the LICENSE file. |
| 6 | |
| 7 | package main |
| 8 | |
| 9 | func main() { |
| 10 | |
| 11 | type T struct { |
| 12 | s string; |
| 13 | f float; |
| 14 | }; |
| 15 | var s string = "hello"; |
| 16 | var f float = 0.2; |
Russ Cox | be2edb5 | 2009-03-03 08:39:12 -0800 | [diff] [blame] | 17 | t := T{s, f}; |
Rob Pike | bb57a5b | 2008-06-16 15:18:10 -0700 | [diff] [blame] | 18 | |
| 19 | type M map[int] int; |
Russ Cox | be2edb5 | 2009-03-03 08:39:12 -0800 | [diff] [blame] | 20 | m0 := M{7:8}; |
Rob Pike | bb57a5b | 2008-06-16 15:18:10 -0700 | [diff] [blame] | 21 | } |