But, if we are using this lore, (which was disapproved of by
@doctorbadwolf ) then we also have to acknowledge that "what to do" involves hitting them with sticks and throwing rocks at them.
Even if we assume slings, that gives the Halflings slings, that is a range of 30/120 vs the goblins 80/240 with bows and armor. Are we going to say that the halflings improvised barrel lids are as good as the Goblins actual shields? Sticks beat scimitars?
This is a very problematic fight to declare that the Halflings would win, based only on that, and ignoring the fact that since thesre are mostly commoner's they have about half the health of the goblin raiders.