wrap goversion check in func for ast building