\textbf{17 --} If $f(x) = \left(\dfrac{-1+\sin x}{1+\sin x}\right)^2$ and $f(x) = xg(x)+1$, then $\displaystyle\lim_{x \to 0} g(x)$ equals: \medskip (1) $4$ \hfill (2) $2$ \hfill (3) $-4$ \hfill (4) $-2$ \bigskip