left align example snippets

This commit is contained in:
onyx-and-iris 2024-11-04 15:10:12 +00:00
parent 07ffd98e7a
commit 46d3e3fa4a

View File

@ -59,7 +59,7 @@ You may want to change the default timeout if some of your responses are getting
For example: For example:
```go ```go
rcon, err := q3rcon.New( rcon, err := q3rcon.New(
host, port, password, host, port, password,
q3rcon.WithDefaultTimeout(50*time.Millisecond)) q3rcon.WithDefaultTimeout(50*time.Millisecond))
``` ```
@ -69,12 +69,12 @@ For example:
Perhaps there are some requests that take a long time to receive a response but you want the whole response in one chunk. Pass a timeouts map, for example: Perhaps there are some requests that take a long time to receive a response but you want the whole response in one chunk. Pass a timeouts map, for example:
```go ```go
timeouts := map[string]time.Duration{ timeouts := map[string]time.Duration{
"map_rotate": 1200 * time.Millisecond, "map_rotate": 1200 * time.Millisecond,
"map_restart": 1200 * time.Millisecond, "map_restart": 1200 * time.Millisecond,
} }
rcon, err := q3rcon.New( rcon, err := q3rcon.New(
host, port, password, host, port, password,
q3rcon.WithTimeouts(timeouts)) q3rcon.WithTimeouts(timeouts))
``` ```