move return outside of switch for go 1.0 / travis