We have measured the low-temperature magnetoresistance (MR) of single cobalt nanowires of various lengths, thicknesses, and widths prepared by electron-beam lithography. The MR measurements exhibit peaks at the coercive fields Hc where Hc increases with decreasing wire width. From the shape of the peaks different switching mechanisms can be distinguished. While the resistance jumps for platinum-covered Co nanowires are sharp, pure Co nanowires exhibit broadened peaks due to domain-wall pinning at the Co/CoO interface. Covering the Co nanowires with insulating carbon yields a sharp switching behavior while simultaneously offering the possibility to investigate the resistance behavior of pure cobalt. By reducing the thickness of the wires the sharpness of the switching behavior continuously degenerates.