The function \(g\) is defined by \(g(x)=|x-1|-2 \). If \(g(a)=g(0)\) and \(a>0\), what is the value of \(a\)?