Proof (Cauchy's integral theorem on starlike domain)

The hypothesis implies that $\oint_{\partial T} f = 0$ for all triangles $T\subseteq U$.

By the converse of the fundamental theorem of calculus, there is a holomorphic antiderivative $F$, i.e. $F'=f$ in $U$.

Thus by the fundamental theorem of calculus, $\oint_γ f = \oint_γ F' = 0$ for all closed curves $γ$ in $U$.