In general, if a continuous function $g(x)$ is defined on the interval $[-\pi,\pi]$, can I say it is definitely possible to extend this function to be a $2\pi$-period function? I think we need to make sure the endpoints match? Functions are $2\pi$-period on the real line are also called functions on a circle in Fourier analysis. But what about $$g(x) = x \\on\ [-\pi,\pi]$$
This is clearly continuous, but $g(-\pi) \ne g(\pi)$. How can I still extend this function to a continuous $2\pi$-period function? Or do I have some conceptual misunderstandings?
Thanks so much for your help.