Given any real line $G$ in $\mathbb{C} \cong \mathbb{R}^2$, meaning that $G$ is of the shape $\{a + b t | t \in \mathbb{R}\}$ for any $a, b \in \mathbb{C}, b ≠ 0$, I want to proof that:
Any complex function that is continuous on $U \subseteq \mathbb{C}$ and holomorphic on $U \backslash G$ is also holomorphic on $U$.
Now in case that $U$ and $G$ don't share any elements, this is certainly true, and it also seems to make sense intuitively when $G$ passes through $U$. But I'm not so sure how to proof that.
My first thought was utilizing the Schwarz Reflection Principle onto this, but I'm not so sure anymore about that. For this princple, we need to know that a function is holomorphic on $\{z \in \mathbb{C} | Im(z) > 0\}$, and continuous on $\{z \in \mathbb{C} | Im(z) ≥ 0$}.
Now, the fact that we have any real line here and not just the real number line probably wouldn't be so much of a problem, as one could probably compose $f$ with another function that rotates and moves $f$ so that $G$ becomes the real number line. But in our case, we already have $f$ defined on the entirety of $U$, whereas the Schwarz Reflection Principle gives us an extension of a function that's not defined on the other side of the "line". Can we still apply the Schwarz Principle?
(If there is another, maybe easier solution, it would also be appreciated. The Schwarz Reflection Principle just was the first thing to come to my mind so far.)