complex integral over a dislocated circle [closed]

We are working on the complex plane here. I can't solve what seems to be a quite easy integral.

\begin{equation} \int_{|z-1|=1}\frac{1}{z^2-1}dz \end{equation}

I would use the Barrow rule, but unfortunately, there are discontinuity points, so I am not sure you can just use the primitive of the function.

Thank you for the help.


Write $$\frac{1}{z^2 - 1} = \frac{f(z)}{z-1}$$ where $f(z) = \frac{1}{z+1}$. Since $f$ is analytic inside and on the curve $|z - 1| = 1$, the Cauchy integral formula yields the result $2\pi i f(1) = \pi i$.