mirror of
https://code.dumpstack.io/tools/appvm.git
synced 2024-11-23 04:33:02 +00:00
Refactor prefix search
This commit is contained in:
parent
660c8a5dba
commit
bb5a352215
2
appvm.go
2
appvm.go
@ -111,7 +111,7 @@ func list(l *libvirt.Libvirt) {
|
|||||||
|
|
||||||
fmt.Println("Started VM:")
|
fmt.Println("Started VM:")
|
||||||
for _, d := range domains {
|
for _, d := range domains {
|
||||||
if d.Name[0:5] == "appvm" {
|
if strings.HasPrefix(d.Name, "appvm") {
|
||||||
fmt.Println("\t", d.Name[6:])
|
fmt.Println("\t", d.Name[6:])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user