Suppose $f$ is a non-vanishing continuous function on $\bar{\mathbb{D}}$ that is holomorphic in $\mathbb{D}$. Prove that if $$|f(z)|=1~~~\text{whenever}~~~|z|=1$$ then $f$ is constant.
I have proved this by showing that the function $$F(z)=\left\{\begin{array}{cc}f(z)&\text{when}~~|z|\leq1\\ 1/\bar{f}(\bar{z})&\text{otherwise}\end{array}\right.$$ is bounded and entire.
Is there any other more elegant way to do this problem, because my method is turning out to be too gruesome for this beautiful problem.
Thanks in advance!