add 04.2.md translate for ch 4.2

This commit is contained in:
Zhanming Qi
2013-04-15 19:50:45 +08:00
parent 298936201c
commit 8e47a7e906
5 changed files with 347 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
package main
import (
fmt
)
const c = C
var v int = 5
type T struct{}
func init() { // initialization of package
}
func main() {
var a int
Func1()
// ...
fmt.Println(a)
}
func (t T) Method1() {
//...
}
func Func1() { // exported function Func1
//...
}