One-step synthesis of cobalt-doped MoS2 nanosheets as bifunctional electrocatalysts for overall water splitting under both acidic and alkaline conditions.