Skip to content

Commit 6de4e3a

Browse files
committed
Fix doc and lint
1 parent 09377b0 commit 6de4e3a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/commands/instance.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1706,6 +1706,7 @@ scw instance server console <server-id ...> [arg=value ...]
17061706
|------|---|-------------|
17071707
| server-id | Required | Server ID to connect to |
17081708
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `fr-par-3`, `nl-ams-1`, `nl-ams-2`, `nl-ams-3`, `pl-waw-1`, `pl-waw-2`, `pl-waw-3` | Zone to target. If none is passed will use default zone from the config |
1709+
| ws-url | | WebSocket URL to connect to (overrides default) |
17091710

17101711

17111712

internal/gotty/client.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package gotty
44

55
import (
66
"encoding/base64"
7+
"errors"
78
"fmt"
89
"net/url"
910
"os"
@@ -45,9 +46,10 @@ func NewClient(zone scw.Zone, serverID string, secretKey string) (*Client, error
4546
func (c *Client) SetWsURL(url string) error {
4647
// Basic validation that it's a wss URL
4748
if !strings.HasPrefix(url, "wss://") {
48-
return fmt.Errorf("URL must start with wss://")
49+
return errors.New("URL must start with wss://")
4950
}
5051
c.wsURL = url
52+
5153
return nil
5254
}
5355

0 commit comments

Comments
 (0)