remove unused dir var with tighter Go checks