Consider $C[0,1]$ (the space of continuous functions on $[0,1]$) with the max-norm (assume the underlying field is $\mathbb{R}$). For $g \in C[0,1]$, define $\Phi_g: C[0,1] \rightarrow \mathbb{R}$ by
\begin{equation*} \Phi_g(f) = \int_0^1 f(t)g(t) \space dt, \end{equation*}
where the integral is the ordinary Riemann integral.
I want to prove that $\Phi_g \in C[0,1]^*$ and $\| \Phi_g \|= \int_0^1 |g(t)| \space dt$. I've proved that
\begin{equation*} \| \Phi_g(f) \| \leq \| f \| \int_0^1 |g(t)| \space dt. \end{equation*}
Therefore, all I'm missing is an $f \in C[0,1]$ such that $\|f\| \leq 1$ and $\| \Phi_g(f) \| = \int_0^1 |g(t)| \space dt$. The constant functions $1$ or $-1$ work if $g$ is always positive or negative, respectively. Any idea about what function could do the job in any other case? My first idea was $f = |g|/g$, but this $f$ is not necessarily continuous.