Go Tips Learned From Writing go-libxml2/go-xmlsec

Daisuke Maki
Dec 14, 2015 · 12 min read

go-libxml2とgo-xmlsec


cgoに関する知見

Cへのアクセスは1カ所にまとめる

C構造体へのポインタを避ける

GC times for C pointer, unsafe.Pointer and uintptr (unit is in nano seconds)

uintptrを使う他の理由

cgoは意外と速くならない

その他の気づき

事実上の密結合だけどどうしても名前空間を分けたい!

それでも駄目な時は… 関数を登録


Daisuke Maki

Written by

Go/perl hacker; author of peco; works @ HDE Inc; mastermind of builderscon; Proud father of three boys;

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade