What was the purpose of slave spirituals like follow the drinking gourd?

Follow The Drinking Gourd was giving directions to freedom. Every other sentence had directions on where to go to find the man who will lead you to freedom. We just did this unit in my English class. Hope this helps.