2015-01-05から1日間の記事一覧

structの関数プロパティとメソッドの挙動

package main import "fmt" type OpFunc func(int, int) int type Operation struct { // associateされていないのでOperationのプロパティ・メソッドへのアクセスは出来ない。 Do1 OpFunc // 以下コメントを外すと "type Operation has both field and meth…