Cleaning + TODO: PRetty display of snapshot list
This commit is contained in:
parent
ef78245902
commit
1c40e29eff
@ -51,8 +51,6 @@ func listJailSnapshots(jail Jail) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf(out)
|
|
||||||
|
|
||||||
dateLayout := "Mon Jan _2 15:04 2006"
|
dateLayout := "Mon Jan _2 15:04 2006"
|
||||||
loc, _ := time.LoadLocation(gTimeZone)
|
loc, _ := time.LoadLocation(gTimeZone)
|
||||||
|
|
||||||
@ -81,6 +79,7 @@ func listJailSnapshots(jail Jail) {
|
|||||||
ss := initSnapshotSortStruct()
|
ss := initSnapshotSortStruct()
|
||||||
SnapshotsOrderedBy(ss.CreationInc).Sort(snapshots)
|
SnapshotsOrderedBy(ss.CreationInc).Sort(snapshots)
|
||||||
|
|
||||||
|
// TODO : Pretty display. Make an interface of displayStructFields?
|
||||||
for _, s := range snapshots {
|
for _, s := range snapshots {
|
||||||
fmt.Printf("| %s | %s | %s | %s |\n", s.Name, s.Creation.String(), s.Referenced, s.Used)
|
fmt.Printf("| %s | %s | %s | %s |\n", s.Name, s.Creation.String(), s.Referenced, s.Used)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user