summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--argv.go1
-rw-r--r--main.go7
-rw-r--r--structs.go4
3 files changed, 3 insertions, 9 deletions
diff --git a/argv.go b/argv.go
index d2965cb..8b56309 100644
--- a/argv.go
+++ b/argv.go
@@ -14,7 +14,6 @@ var argv args
type args struct {
ListRepos bool `arg:"--list-repos" help:"list all repositories"`
Port int `arg:"--port" default:"2520" help:"port to run on"`
- Config string `arg:"env:VIRTIGO_HOME" help:"defaults to ~/.config/virtigo/"`
Start string `arg:"--start" help:"start a droplet"`
}
diff --git a/main.go b/main.go
index db81d9a..0c4f04a 100644
--- a/main.go
+++ b/main.go
@@ -18,7 +18,6 @@ import (
"embed"
"net"
"os"
- "path/filepath"
"time"
"github.com/digitalocean/go-qemu/hypervisor"
@@ -33,11 +32,6 @@ var hv *hypervisor.Hypervisor
var resources embed.FS
func main() {
- if os.Getenv("VIRTIGO_HOME") == "" {
- homeDir, _ := os.UserHomeDir()
- fullpath := filepath.Join(homeDir, ".config/virtigo")
- os.Setenv("VIRTIGO_HOME", fullpath)
- }
var pp *arg.Parser
pp = arg.MustParse(&argv)
@@ -45,6 +39,7 @@ func main() {
pp.WriteHelp(os.Stdout)
os.Exit(0)
}
+ me = new(Virtigod)
me.Hostname, _ = os.Hostname()
log.DaemonMode(true)
diff --git a/structs.go b/structs.go
index 77d9c29..b209c9b 100644
--- a/structs.go
+++ b/structs.go
@@ -1,9 +1,9 @@
package main
-var me Virtigod
+var me *Virtigod
// this app's variables
type Virtigod struct {
Hostname string
- dirs []string
+ dirs []string
}