## go · function

Navigate to a new URL by pushing a new history entry.

Note that this happens synchronously, immediately updating `route` and processing any reactive updates based on that.

**Signature:** `(target: RouteTarget, nav?: NavType) => boolean | Promise<boolean>`

**Parameters:**

- `target: RouteTarget` - A subset of the `Route` properties to navigate to. If neither `p` nor `path` is given, the current path is used. For other properties, an empty/default value is assumed if not given. For convenience:
- You may pass a string instead of an object, which is interpreted as the `path`.
- You may pass an array instead of an object, which is interpreted as the `p` array.
- If you pass `p`, it may contain numbers, which will be converted to strings.
- If you pass `search`, its values may be numbers, which will be converted to strings.

Examples:
```js
// Navigate to /users/123
route.go("/users/123");

// Navigate to /users/123?tab=feed#top
route.go({p: ["users", 123], search: {tab: "feed"}, hash: "top"});
```
- `nav: NavType` (optional)

**Returns:** Whether the navigation was performed — `false` when a guard (see
`setGuard`) vetoed it. Without a guard, or with one that answers
synchronously, this stays a synchronous `boolean`; an async guard makes it a
promise, and the navigation is applied when (and if) that verdict passes.
Beware that a promise is truthy: `await` the result before branching on it,
unless you know the guard answers synchronously.
