There are many versions of this song, with varying words and melodies. I’ve tried to distill the various ideas down into something digestible, always keeping in mind that it’s a folk song and its origins are therefore murky. The initial inspiration may have come from a farewell letter written by Scotsman Thomas Armstrong on the eve of his execution in 1605 for border raiding. Here’s what he wrote:
This night is my departing night, For here nae langer must I stay;
There’s neither friend nor foe o’ mine, But wishes me away.
What I have done thro’ lack of wit, I never, never, can recall;
I hope ye’re a’ my friends as yet; Goodnight and joy be with you all!