Common code used by all gopm packages