The boundary of a region for complex-valued functions From Chapter $3$ of Stein and Shakarchi's complex analysis book, we have the following problem ($15$):

Show that if $f$ is holomorphic in the unit disc (open), bounded, and converges uniformly to zero in the sector $\theta<\arg z<\varphi$ as $|z|\to1$, then $f=0$.

We're supposed to use either the Cauchy inequalities or maximum modulus principle (per the instructions at the beginning, since this is a $4$-part problem), but I don't quite see how to do it using either of those, though the structure of the problem seems to lend itself to the maximum modulus principle. The problem with this is that we know that in the interior of the sector, the function cannot attain a maximum modulus, however, we don't know anything about the boundary of the sector that is in the interior of the circle. This is one obstacle I couldn't quite overcome.
My approach was to extend the function past the boundary of the circle, which we can do since $f$ is bounded (I think, though even this part is a little bit 'hand-wavy'), and then, since it has a cluster of zeros, the function will be identically zero.
How should I approach the problem with the intention of using the maximum modulus principle or Cauchy inequalities? Any suggestions would be appreciated. Thanks!
EDIT: I've been thinking about this problem, and I've come up with the following solution:
Let $f$ be an analytic function on $\mathbb{D}$ (take note that I'm not assuming $f$ is bounded), with the property that for $\theta<\arg z<\varphi$, $|f(z)|$ converges to zero uniformly as $|z|\to1$ in this sector. Then we can make a 'bump' on the disc in this sector so that it extends in this outside of $\mathbb{D}$, call this set $\Omega'$. Define $$g(z)=\begin{cases}f(z)&:\,z\in\Bbb D\\0 &:z\notin\Bbb D\end{cases}.$$ Now, clearly in $\Bbb D$ $g(z)$ is holomorphic and outside of $\Bbb D$, it's holomorphic as it's constant, so the only questionable part would be on the boundary of the disc in this sector. At this point, we can take a small disc around each point entirely contained in $\Omega'$, since it's open, and apply Morera's theorem to show that $g(z)$ is holomorphic here. Therefore, on all of $\Omega'$, $g$ is holomorphic and has a cluster of zeros, hence is identically equal to zero, therefore $f(z)=0$.
Is this proof correct? Or did I miss something and there is a counterexample when $f$ is not bounded? If it is correct, it's nice in that the proof didn't rely on the shape of the region at all, only on the fact that there was a nondegenerate connected subset of the boundary with the property. Therefore, we see the exercise as a very special case of the generalized problem.
 A: A particular case that should help you think of a solution is when the sector is of the form $0\leq \text{arg}z \leq \pi$. In this case consider $g(z)=f(z)f(-z)$. Since $f$ is bounded, $g$ admits a continuous extension to the boundary of the circle that is $0$ on said boundary. The maximum modulus principle gives the result.
A: First of all, I think you should upvote (if you haven't already) and accept José's answer, which seems like the canonical answer.
To address the follow up questions and remarks:
I think your argument is correct, but it took me a little while to see why the integral of $g$ over a curve that crosses $\partial\mathbb{D}$ should be zero. You should provide some more details here.
The result is certainly true without assuming that $f$ is bounded. Here is another way to see this: Instead of bumping $\partial\mathbb{D}$ outward, we can create an inward bump. More precisely, let $U$ be an open subset of $\mathbb{D}$ whose closure contains a (non-empty) arc on which $f$ extends to $0$. By shrinking $U$ a little, we can assume that $f$ is bounded on $U$, that $U$ is simply connected and that the boundary of $U$ is reasonably smooth. Map $U$ biholomorphically onto the unit disc (Carathéodory's theorem assures that the Riemann map extends continuously up to the boundary, so the arc maps onto another non-empty arc). This construction reduces the problem the the case where $f$ is bounded, and we can apply José's solution and pull it back. Hence $f = 0$ on an open set, and by the identity theorem, $f = 0$ everywhere.
