In $\mathbb{R}^n$, locally lipschitz on compact set implies lipschitz I need to prove:

Let $A$ be open in $\mathbb{R}^m$, $g:A \longrightarrow \mathbb{R}^n$ a  locally lipschitz function and $C$ a compact subset of $A$.
Show that $g$ is lipschitz on $C$.

Can anyone help me?
 A: In general I prefer covering arguments (such as the one @WillieWong posted) to "choose a sequence and get a contradiction", but in this particular problem the second approach could be easier to implement (it avoids the technicalities pointed out by Willie). 
Suppose $g$ is not Lipschitz on $C$: that is, there exists two sequences $x_n,y_n\in C$ such that $|g(x_n)-g(y_n)|/|x_n-y_n|\to \infty$. Since $g$ is bounded on $C$ (why?), we have $|x_n-y_n|\to 0$. Choose a convergent subsequence $x_{n_k}\to x$. Observe that the local Lipschitz-ness fails at $x$. 
A: Hint: $C$ being compact means for any open cover it has a finite subcover. Let $x\in C$ and let $U_x$ be the corresponding open set on which $g:U_x\to\mathbb{R}^n$ is Lipschitz. This means that $C$ can be covered by finitely many of the $U_x$. Lastly use the fact that the among a finite set of positive numbers you can choose a maximum one. 
A: Maximize the continuous function $f(x,y)=\frac{|g(x)-g(y)|}{|x-y|}$ over the compact set $C\times C\cap\{|x-y| \geq \varepsilon\}$ with a sufficiently small $\varepsilon>0$. Locally Lipschitz condition is used to show that $f$ is bounded in $C\times C\cap\{|x-y|<\varepsilon\}$.
