16 lines
322 B
Go
16 lines
322 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"isle/daemon"
|
||
|
)
|
||
|
|
||
|
func (ctx subCmdCtx) getHosts() (daemon.GetHostsResult, error) {
|
||
|
var res daemon.GetHostsResult
|
||
|
err := ctx.daemonRCPClient.Call(ctx.ctx, &res, "GetHosts", nil)
|
||
|
if err != nil {
|
||
|
return daemon.GetHostsResult{}, fmt.Errorf("calling GetHosts: %w", err)
|
||
|
}
|
||
|
return res, nil
|
||
|
}
|