During class, we proved the maximum modulus principle using the fact that: $$f(z)=\frac{1}{2\pi}\int_0^{2\pi} f(z+ \rho e^{i\theta})dz$$ Where we are considering a curve centered in z and with radius $\rho$ included in a domain D where f is holomorphic We also assumed f is continuous on $\partial D$.
So we started by saying that, given $z_0 \in D$: $$\left|f(z_0)\right|=\frac{1}{2\pi} \left\vert \int_0^{2\pi} f(z_0+ \rho e^{i\theta})dz \right\vert \le \frac{1}{2\pi} 2\pi \space max \left\vert f(z_0+ \rho e^{i\theta} \right\vert$$
Where the inequality is due to the Darboux inequality.
This is when I got lost, because now we say "choosing $\rho = r$ so that our curve is on $\partial D$, we find that, if $w=z_0+re^{i \theta}$, then $|f(z_0)|<|f(w)|$". But I don't understand where that < comes from: shouldn't it be a $\le$? But it if was so, of course $f(z_0)$ could be a maximum, so it doesn't make sense.
I'm sure I lost some step, but I don't know which one.
EDIT
I'm sorry for not being specific enough. An assumption of the theorem is that f is not constant on D; under this condition, it's maximum is on ∂D. I'm gonna try to explain better what I don't understand: let $z_0$ be the center of the domain D where f is holomorfic. Now, we can say that $|f(z_0)|$ is less or equal to the maximum of f(z) on the circle centered in $z_0$ and of radius $R_1$. Let this maximum be equal to a certain value "a". Since this inequality is ≤, it could be that $f(z_0)=a$. Now, we can repeat this process for each circle centered in $z_0$ with different radiuses, until the circle is ∂D itself. Referring to the following image, can't we say that f=a on each point of the purple line (if we considered a lot of circles, I'm assuming the maximum is equal to "a" on each circle, and the values of z for which f(z)=a are all aligned on that purple line).
At this point, we have a function which is constant on one direction only, so it is not constant everywhere, and yet the maximum is assumed inside D, not only on ∂D.
Of course there must be a flaw in this line of reasoning, but I can't understand where it is.

The point is to characterize the equality case of $|f(z_0)| \leq \text{max} |f(z_0 + \rho e^{i\theta})|.$ Let $S_\rho$ denote the circle of radius $\rho$ centered at $z_0$. For equality, we must have $$\left| \frac{1}{2\pi}\int_0^{2\pi} f(z_0+ re^{i\theta})d\theta \right| = \frac{1}{2\pi} \int_0^{2\pi} |f(z_0+\rho e^{i\theta})| d\theta = \text{max} |f(z_0+\rho e^{i\theta})|.$$ The first equality holds if and only if $f$ has constant argument on $S_\rho$, and the second equality holds if and only if $f$ has constant magnitude on $S_\rho$ (we're using continuity of holomorphic functions). So equality holds if and only if $f$ is constant on $S_\rho$, which has a limit point, and so we force $f$ to be constant by the identity principle for holomorphic functions. So a strict "$<$" holds unless $f$ is constant.