How was togo colonized?

Before World War I, there was a Germany colony called Togoland. After the war, it was partitioned; the British part became Ghana, and the French part became Togo.