2016-12-01から1ヶ月間の記事一覧
Golangでスライス型にスライス型をappendする。 s1 := []string{"aa", "bb", "cc"} s2 := []string{"dd", "ee", "ff"} s1 = append(s1, s2) としてgo runすると cannot use r (type []string) as type string in append とエラーしてしまう。[]stringにappen…
※2016/12/16 修正しました Go言語のO/R Mapper、dbrでreplace intoがしたかった。 のですが、dbrではreplace構文はサポートしてないらしい。 それで、delete-insertで対応することにしました。 type ( //User ユーザー User struct { ID int Contacts []*Con…