Math Help - Contour integral

1. Contour integral

Evaluate the contour integral $\int_\gamma \frac{1}{z} dz$ where $\gamma = {z \in \mathbb{C} : z=e^{i\theta}, \theta \in [-\pi/2, \pi/2]}.$
I keep getting $i\pi$ but the answer should be $-i\pi$, what am i doing wrong?

2. Re: Contour integral

The contour is the half circle centred at the origin of radius 1 starting at $\displaystyle \theta = -\frac{\pi}{2}$ and ending at \displaystyle \begin{align*} \theta = \frac{\pi}{2} \end{align*}, so a decent parameterisation is \displaystyle \begin{align*} z = e^{i\theta} \implies dz = i\,e^{i\theta} \end{align*}, therefore

\displaystyle \begin{align*} \int_{\gamma} { \frac{1}{z}\,dz } &= \int_{ -\frac{\pi}{2} }^{ \frac{\pi}{2} }{ \frac{1}{ e^{i\theta} } \, i\, e^{i\theta} \,d\theta} \\ &= \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}{i\,d\theta} \\ &= i\left[ \theta \right] _{-\frac{\pi}{2}}^{\frac{\pi}{2}} \\ &= i \left[ \frac{\pi}{2} - \left( -\frac{\pi}{2} \right) \right] \\ &= i\, \pi \end{align*}

The solutions talk about how Log z is not holomorphic on $[0,\infty)$ and that $\gamma$ intersects with this branch cut. Also in the solutions they integrated directly without parametrising. I wonder how it would work with a parametrisation?