I wonder if this is correct: there is a holomorphic function on an open connected subset $G$ of $\mathbb{C}$ which maps $G$ onto a subset of a straight line, and I have to show that the function is constant.
I thought I can suppose that the straight line is the real axis (otherwise I can find a rotation and a traslation that will do so) and so using the Cauchy-Riemann equations I find that the function is constant since its imaginary part is zero. Is that correct? Thank you