We have measured the yield strength of gold nanowires with diameters in the range from 30 to 70 nm fabricated by electro-deposition into porous alumina templates. All nanowire sizes showed yield strengths much greater than polycrystalline gold with the 30 nm specimens having a yield strength of 1.4 GPa. We found no significant work hardening at plastic strains up to 30%. The strength of the nanowires as a function of wire diameter follows the same trend as has been found for the compression strength of larger gold pillars reported in the literature. TEM observations of deformed wires are consistent with mechanisms of dislocation induced deformation. The strength of nanoporous gold nanowires measured by uniaxial compression test is also reported here. Although two different mechanisms are thought to operate in gold nanowires and nanoporous gold respectively, their strengths show very similar dependence on wire or ligament diameter. However the nanoporous material shows significant strain hardening.