summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-01 00:42:02 -0500
committerJeff Carr <[email protected]>2024-11-01 00:42:02 -0500
commitfb9f42285dd9f2840566b71d05f4383a00cfd267 (patch)
tree52944e97de9bdf2520c1760d41ecd3fbf7892a4f /main.go
parenta1feb086a638ef8380e008f88835567fdc10f44c (diff)
sprintf changesv0.0.3
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
-rw-r--r--main.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/main.go b/main.go
index 0ae2a4d..5898ba2 100644
--- a/main.go
+++ b/main.go
@@ -66,10 +66,19 @@ func main() {
}
if argv.Import != nil {
- log.Info("should import here", argv.Start)
- log.Info("virtigoctl import --host farm04 --name grafana")
+ if argv.Import.DomainName == "" {
+ pp.WriteHelp(os.Stdout)
+ log.DaemonMode(true)
+ log.Info("Example:")
+ log.Info("")
+ log.Info(" virtigoctl import --domain grafana # will look for an existing libvirt domain")
+ log.Info("")
+ os.Exit(0)
+ }
+ log.Info("\n\nshould import here", argv.Start, "\n")
log.Info("import", argv.Import.Host, argv.Import.DomainName)
- os.Exit(0)
+ url := "/import?domainName=" + argv.Import.DomainName
+ dumpStdout(url)
}
}