A community golf course which has been in use for more than a century is to close because of budgets cuts.