2016-07-12から1日間の記事一覧

golang で type XXX has both field and method named YYY

golang で以下のエラーが出た。 type XXX has both field and method named YYY「XXX はYYYというフィールドとメソッド両方を持ってます」つまり、struct に同名のフィールドとメソッドは定義できない。理由は以下にある。 https://groups.google.com/d/msg/…