mirror of
https://code.dumpstack.io/tools/appvm.git
synced 2024-11-23 16:41:29 +00:00
Show local apps as available
This commit is contained in:
parent
6ebc562599
commit
cc92ec3e23
10
appvm.go
10
appvm.go
|
@ -102,12 +102,20 @@ func list(l *libvirt.Libvirt) {
|
|||
}
|
||||
|
||||
fmt.Println("\nAvailable VM:")
|
||||
files, err := ioutil.ReadDir(os.Getenv("GOPATH") + "/src/code.dumpstack.io/tools/appvm/nix")
|
||||
files, err := ioutil.ReadDir(configDir + "/nix")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
for _, f := range files {
|
||||
switch f.Name() {
|
||||
case "base.nix":
|
||||
continue
|
||||
case "local.nix":
|
||||
continue
|
||||
|
||||
}
|
||||
|
||||
fmt.Println("\t", f.Name()[0:len(f.Name())-4])
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue