golang 工程中包的使用

同一個包的不一樣部分是能夠放在同一個文件夾下的多個文件中的。 package main import "fmt" /* // 這裏放在同一文件中沒有任何的問題 type rect struct{ width, height int } func (r *rect) area() int { return r.width * r.height } func (r *rect) perim() i
相關文章
相關標籤/搜索