Differentiability of indefinite integral Let $$ f(x)-f(a)=\int_a^xg(t)dt  , x\in[a,b]$$
where g is a Borel integrable function.
If g is continuous in $x\in[a,b]$ we have to prove that f is differentiable at x and f'(x)=g(x).
My attempt at a proof
Let h>0, than we have $$f(x+h)-f(x)=\int_x^{x+h}g(t)dt$$
Let $$M_h:=sup(g[ [x,x+h> ])$$ and $$m_h:=inf(g[ [x,x+h> ])$$
Since g is continuous in x, we have $$\lim_{h\to0^+}M_h=\lim_{h\to0^+}m_h=g(x)$$
(This is obvious because for any $\epsilon>0$ by continuity there exists an $h>0$ such that $|M_h-g(x)|<\epsilon$. Analogously for $m_h$.)
Now we have, by monotonicity of the Lebesgue integral, $$h*m_h\le f(x+h)-f(x)\le h*M_h$$
from which it follows by the sandwich theorem that$$\lim_{h\to0^+}\frac{f(x+h)-f(x)}{h}=g(x)$$
We proceed analogously for left limits and get the result. 
My questions are whether the proof is correct, and more importantly, what is an easier way? Ash in his book "Probaility and measure theory" says that the proof is analougus to the standard calculus proof, but it uses the mean value theorem for integrals which doesn't seem to be applicable here...

Since $g$ is continuous, we can invoke the standard $\varepsilon$-$\delta$ machinery:
Let $\varepsilon>0$ and choose $\delta$ so that $|x-y|<\delta$ implies $|g(x)-g(y)|<\varepsilon$. Then for $y\in(a,b)$ with $0<|x-y|<\delta$ we have
\begin{align}
\left|\frac{f(y)-f(x)}{y-x}-g(x)\right| &= \left|\frac{\int_a^y g(t)\,\mathsf dt-\int_a^x g(t)\,\mathsf dt}{y-x} - g(x) \right|\\
&=\left|\frac{\int_x^y g(t)\,\mathsf dt - \int_x^y g(x)\,\mathsf dt }{y-x} \right|\\
&= \left|\frac{\int_x^y(g(t)-g(x))\,\mathsf dt}{y-x} \right|\\
&<\frac{\varepsilon|y-x|}{|y-x|}\\&=\varepsilon.
\end{align}
