feat: auto detect hostname
This commit is contained in:
parent
2c27823e18
commit
c0baf4fa3b
13 changed files with 300 additions and 125 deletions
|
|
@ -33,8 +33,8 @@ func NewClient(hostname, token string) (*Client, error) {
|
|||
}, nil
|
||||
}
|
||||
|
||||
func NewClientFromConfig(cfg *config.Config, hostname string) (*Client, error) {
|
||||
host, err := cfg.GetHost(hostname)
|
||||
func NewClientFromConfig(cfg *config.Config, hostname string, detectedHost string) (*Client, error) {
|
||||
host, err := cfg.GetHost(hostname, detectedHost)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue