Find a complex analytic function equivalent to $|z-1|$ on a circle. Let $f$ be the complex function $f(z) = |1-z|$ and let $C$ be the circle centered at the origin with radius 1. $f$ is not analytic at 1, but I'm trying to find a function $g$ which is analytic (on a domain containing $C$) and takes the same values on the curve $C$. That is to say, $f(z) = g(z)$ for all $z \in C$.
Intuitively $|1-z|$ represents the distance from $z$ to 1. When $z = 1$ this is 0, when $z = i$ this is $\sqrt 2$, and when $z = -1$ this is 2. It certainly behaves like $2\sin(x)$ as $z$ traces a path through the circle, but I don't see how to write that as a function of $z$.
For any given $z$ I know it has an argument and radius, so $z = re^{i\theta}$. And with that $\theta$, I could then do some trig and get an expression for $f(z)$. But it would be in terms of $\theta$ and I don't think that's legitimate, if we're looking for a function of $z$.
Anyone have any ideas?
[Edit: If it helps to clarify, $C$ here is the set of all points satisfying $|z|=1$.]

As Funktoriality explained, one cannot do this in a neighbourhood of $1$, but can we
do this if we avoid $z=1$?
On the unit circle,
$$f(z)^2=|1-z|^2=(1-z)(1-\overline z)=(1-z)(1-z^{-1})=-\frac1z(1-z)^2.$$
Let's take then $g(z)$ to be $1-z$ times a suitable branch of $\sqrt{-1/z}$
defined on the complex plane slit along the positive real axis. This will give
a holomorphic extension of $f$ to a neighbourhood of $C-\{1\}$ which is
the best one can hope for.
