Using Morera to show $f$ is entire My question is motivated by this post.
Let $f : \mathbb{C} \to \mathbb{C}$ be continuous and $f|_{\mathbb{C} \backslash S^1} :\mathbb{C} \backslash S^1 \to \mathbb{C}$ be holomorphic. I am trying to show that $f$ is entire, i.e. holomorphic everywhere.
My attempt: As the hint in the aforementioned post suggested, we'll try to use Morera: Let $\Omega := \mathbb{C}$ be the open set in Morera. Let $a,b,c \in \mathbb{C}$ and let $T$ be the convex hull of $a,b,c$. Then, we want to show that $\int_{\partial T}f(z)\,dz=0$ for all triangles $\partial T$.
If $\partial T \cap S^1 = \emptyset$, then $\int_{\partial T}f(z)\,dz=0$ anyway. So assume $\partial T \cap S^1 \neq \emptyset$. Then, we see that $\#(\partial T \cap S^1) \leq 6$, since each edge of $\partial T$ has at most two points of intersection with $S^1$. Let $I := \partial T \cap S^1$. Assume w.l.o.g. $\#I=1$ and that this one point of intersection lies in the middle of the edge connecting $a$ and $b$. Then, because $I$ is just a single point, we can write
\begin{align}
\int_{\partial T}f(z)\,dz &= \int_{\partial T \backslash I}f(z)\,dz = 0,
\end{align}
where the last equality follows from Goursat. This is the part where I'm confused. My idea was that this would work similarly to Riemann integrals over $\mathbb{R}$, where it is possible to integrate a function $g : [0,1]\to\mathbb{R}$ if $g$ has finitely many points where $g$ is not differentiable. So it seemed like it would be okay to integrate over $\partial T\backslash I$, because it is almost a closed curve, on which $f$ is differentiable.
Am I missing something, or does anybody have any suggestions as to how I can finish my proof more rigorously?
 A: I hope it helps you :). I am going to use a general theorem of Cauchy: If $C$ is a closed simple curve such that $f$ is holomorphic over it and its interior then $\int_Cf(z)dz=0$.

We take the triangle such that it intersects the circle $S^1$ and break it with $\alpha$ and $\beta$ where
$\alpha$ is the part of the triangle above the circle and joined with a circular curve ($e^{i\theta}\delta$ where $\delta>1$ and $\theta\in[\theta_1,\theta_2]$), $\beta$ is the part of the triangle below the circle joined with a circular curve ($e^{i\theta}\epsilon$ where $0<\epsilon<1$ and $\theta\in[\theta_2,\theta_1]$). Then if we integrate
$$\int_\alpha fdz+\int_\beta fdz=\int_{l_1} fdz+\int_{l_2}  fdz+\int_{l_3} fdz+\int_{l_4} fdz+\int_{l_5} fdz +\int_{\theta_1}^{\theta_2}f(e^{i\theta}\delta)-f(e^{i\theta}\epsilon)d\theta$$
where $1>\epsilon>0$ tends to 1 and $\delta>1$ tends to 1 and $l_1,l_2,l_3,l_4,l_5$ are the lines of the triangle. Then since $f$ is holomorphic in $\mathbb{C}\backslash S^1$, using the theorem of Cauchy, then
$$\int_\alpha fdz+\int_\beta fdz=0.$$
Since $f$ is continuous
$$\lim_{\delta,\epsilon\rightarrow 1} \int_{\theta_1}^{\theta_2}f(e^{i\theta}\delta)-f(e^{i\theta}\epsilon)d\theta=0.$$
So finally
$$\int_T fdz=\lim_{\delta,\epsilon\rightarrow 1} \left(\int_\alpha fdz+\int_\beta fdz\right)=0.$$
