summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-11 22:39:19 -0500
committerJeff Carr <[email protected]>2024-10-11 22:39:19 -0500
commitf71da2ef59a51788f32b5fe5eb600ce40dbbdd75 (patch)
tree05e6311b676054812a5f9cc1bd8f96689755ac3a /main.go
parentf7ae394d20faab6d6d89554416e0e3bf7dbb2547 (diff)
still does nothing yet
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
-rw-r--r--main.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/main.go b/main.go
index a53e556..577afab 100644
--- a/main.go
+++ b/main.go
@@ -25,11 +25,7 @@ import (
"github.com/digitalocean/go-qemu/qemu"
)
-var (
- network = flag.String("network", "unix", `Named network used to connect on. For Unix sockets -network=unix, for TCP connections: -network=tcp`)
- address = flag.String("address", "/var/run/libvirt/libvirt-sock", `Address of the hypervisor. This could be in the form of Unix or TCP sockets. For TCP connections: -address="host:16509"`)
- timeout = flag.Duration("timeout", 2*time.Second, "Connection timeout. Another valid value could be -timeout=500ms")
-)
+var Version string
func main() {
flag.Parse()
@@ -37,7 +33,7 @@ func main() {
// fmt.Printf("\nConnecting to %s://%s\n", *network, *address)
newConn := func() (net.Conn, error) {
// return net.DialTimeout(*network, *address, *timeout)
- return net.DialTimeout("unix", "/var/run/libvirt/libvirt-sock", *timeout)
+ return net.DialTimeout("unix", "/var/run/libvirt/libvirt-sock", 2*time.Second)
// return net.DialTimeout("tcp", "farm02:16514", *timeout)
}