mirror of
https://code.dumpstack.io/tools/appvm.git
synced 2024-11-26 22:23:01 +00:00
Ignore templates in vm list, fix mistake in copyFiles
This commit is contained in:
parent
252610af57
commit
6f07028ad1
8
appvm.go
8
appvm.go
@ -114,16 +114,18 @@ func list(l *libvirt.Libvirt) {
|
||||
}
|
||||
|
||||
for _, f := range files {
|
||||
if f.Name() != "base.nix" && f.Name() != "local.nix" && f.Name() != "monitor.nix" {
|
||||
if f.Name() != "base.nix" &&
|
||||
f.Name() != "local.nix" && f.Name() != "monitor.nix" &&
|
||||
f.Name() != "local.nix.template" && f.Name() != "monitor.nix.template" {
|
||||
fmt.Println("\t", f.Name()[0:len(f.Name())-4])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func copyFile(to, from string) (err error) {
|
||||
func copyFile(from, to string) (err error) {
|
||||
source, err := os.Open(from)
|
||||
if err != nil {
|
||||
return err
|
||||
return
|
||||
}
|
||||
defer source.Close()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user