A rather odd complex particle, もがな signifies a hope or wish for something to be so. It attaches to uninflecting words and the ren’youkei of unmarked or plain negative verbs/verbal adjectives.
It was commonly 「もがも」or 「もが」in Old Japanese and became「もがな」during Middle Japanese. Other forms include 「もがもよ」, 「もがもや」, 「もがもな」and 「がな」.
世の中にさらぬ別れのなくもがな - 世の中に、避けられない別れがなければいいのになあ
心あらん友もがなと - 心がちゃんとある友達がいたらいいなあと
足の音せず行かむ駒もが - 足音を立てずに行くような馬があればなあ
よからうかたきがな - よい敵がいればいいなあ
世の中は常にもがもな - 世の中はいつも同じだといいのになあ
鳥にもがもや - 鳥であったらいいなあ
石くぐる水にもがもよ - 石を通せる水であったらなあ
Note that the に in the last three examples is the ren’youkei of なり. By extension, the sense of these examples is copular: “if it were.” This is in alignment in examples where the ren’youkei of other verbs or verbal adjectives occur, such as in the first: “if there were no partings” This implies that existential verbs, namely あり, are dropped when this particle is used. We can therefore surmise that the sense of the second, third, and forth examples is existential: “if there were,” rather than “if it were.”