Norm of an integral functional 
Let $k\in C[0,1]$ and let $T$ be the functional on $C[0,1]$ (equipped with sup norm) given by $f\mapsto \int_0^1 kf$. Show that $\Vert T\Vert = \Vert k\Vert_1$.

My attempt: The inequality $\Vert T\Vert \le \Vert k\Vert_1$ is obvious. Indeed, $\Vert Tf\Vert \le \Vert f\Vert_{\infty} \int_0^1 |k|=\Vert k\Vert_1 \Vert f\Vert_{\infty}$.
On the other hand, for $f=k$, we have $$Tf=\int_0^1 k^2=\Vert k\Vert_2^2 \ge \Vert k\Vert_1^2\ge \Vert k \Vert_1$$ by Hölder's inequality. It follows that $\Vert T\Vert = \Vert k\Vert_1$.

Is my solution correct?

PS: This question was actually answered here but there $f=sgn(k)$ which is not a continuous function, so I think the solution there is incorrect.
 A: Conceptually, we resolve the problem with the other solution by approximating $\mathrm{sgn}\circ k$ with continuous functions.
For $k\equiv 0$ we have $Tf=0$, hence $|Tf|=0=\|k\|_1$ and $\|T\|=0=\|k\|_1$, so let  $k$ be non-trivial.
For $\alpha>0$ let $f_\alpha(x)=1$ if $\alpha k(x)>1$, $f_\alpha(x)=-1$ if $\alpha k(x)<-1$ and $f_\alpha(x)=\alpha k(x)$ otherwise, then $f_\alpha$ is continuous. Notice that $\lim_{\alpha\rightarrow\infty}f_\alpha=\mathrm{sgn}\circ k$.
Let $\mathcal X_\alpha=f_\alpha^{-1}(\{-1,0,1\})=\{x:f_\alpha(x)=\mathrm{sgn}(k(x))\}$ and notice that $\lim_{\alpha\rightarrow\infty}\mathcal X_\alpha=[0,1]$.
Let $\alpha$ be sufficiently large such that $\|k\|_\infty(1-|\mathcal X_\alpha|)<\|k\|_1$, so in particular $\|f_\alpha\|_\infty=1$, where $|\mathcal X|=\int_{\mathcal X}$ is the area of $\mathcal X$.
Then we have $Tf_\alpha=\int_{\mathcal X_\alpha}|k|+\int_{[0,1]\setminus\mathcal X_\alpha}f_\alpha k\ge \int_{\mathcal X_\alpha}|k|\ge\|k\|_1-\|k\|_\infty(1-|\mathcal X_\alpha|)$. This gives $|Tf_\alpha|=Tf_\alpha\ge\|k\|_1-\|k\|_\infty(1-|\mathcal X_\alpha|)=(\|k\|_1-\|k\|_\infty(1-|\mathcal X_\alpha|))\|f_\alpha\|_\infty$. Hence, we have $\|T\|\ge\|k\|_1-\|k\|_\infty(1-|\mathcal X_\alpha|)$ for all $\alpha$, yielding $\|T\|\ge\|k\|_1$.
