You know you're dealing with Walt Whitman when you see a lot of first-person point of view that sounds as if the speaker isn't just talking about himself. If the "I" is being used more as a "we," then chances are Whitman's your poet. And if the poem is set in nineteenth-century America with a rather uplifting look at the American spirit, the consequences of war, and the splendor of the natural world, then chances are you're definitely dealing with our man Walt.
If you need any more proof, you need only take a quick look at the form of the poem. If the poem is written in free verse, with lines that are longer for than the port-o-let lines at Coachella, then you know who likely wrote it. And if you look a little closer at those lines and happen to see one highly descriptive use of figurative language and imagery after another, well, you know what's what.