I would try adding some form of validation on the value you are passing. Also: you say it doesn't work but you don't say how it doesn't work (e.g. "it refreshes the current page"; or "it goes back to 1st page plus 1")
Cribbed from w3:
The go(delta) method causes the UA to run the following steps:
1. If the argument to the method was omitted or has the value zero, then act as if the location.reload() method was called instead, and abort these steps.
2. Let delta be the argument to the method.
3. If the index of the current entry of the joint session history plus delta is less than zero or greater than or equal to the number of items in the joint session history, then the user agent must do nothing.
4. Let specified entry be the entry in the joint session history whose index is the sum of delta and the index of the current entry of the joint session history.
5. Let specified browsing context be the browsing context of the specified entry.
6. Traverse the history of the specified browsing context to the specified entry.