goType: only prefix pointer if optionalToPtr==true