|
@@ -67,7 +67,7 @@ func parseRAIDInfo(output string) *RAIDInfo {
|
|
raidInfo.Version = fields[2]
|
|
raidInfo.Version = fields[2]
|
|
case "Creation":
|
|
case "Creation":
|
|
creationTimeStr := strings.Join(fields[4:], " ")
|
|
creationTimeStr := strings.Join(fields[4:], " ")
|
|
- creationTime, _ := time.Parse("Mon Jan _2 15:04:05 2006", creationTimeStr)
|
|
|
|
|
|
+ creationTime, _ := time.Parse("Mon Jan 02 15:04:05 2006", creationTimeStr)
|
|
raidInfo.CreationTime = creationTime
|
|
raidInfo.CreationTime = creationTime
|
|
case "Raid":
|
|
case "Raid":
|
|
if fields[1] == "Level" {
|
|
if fields[1] == "Level" {
|
|
@@ -128,14 +128,14 @@ func parseRAIDInfo(output string) *RAIDInfo {
|
|
func (info *RAIDInfo) PrettyPrintRAIDInfo() {
|
|
func (info *RAIDInfo) PrettyPrintRAIDInfo() {
|
|
fmt.Println("RAID Array Information:")
|
|
fmt.Println("RAID Array Information:")
|
|
fmt.Printf(" Version: %s\n", info.Version)
|
|
fmt.Printf(" Version: %s\n", info.Version)
|
|
- fmt.Printf(" Creation Time: %s\n", info.CreationTime.Format("Mon Jan _2 15:04:05 2006"))
|
|
|
|
|
|
+ fmt.Printf(" Creation Time: %s\n", info.CreationTime.Format("Mon Jan 02 15:04:05 2006"))
|
|
fmt.Printf(" Raid Level: %s\n", info.RaidLevel)
|
|
fmt.Printf(" Raid Level: %s\n", info.RaidLevel)
|
|
fmt.Printf(" Array Size: %s\n", info.ArraySize)
|
|
fmt.Printf(" Array Size: %s\n", info.ArraySize)
|
|
fmt.Printf(" Used Dev Size: %s\n", info.UsedDevSize)
|
|
fmt.Printf(" Used Dev Size: %s\n", info.UsedDevSize)
|
|
fmt.Printf(" Raid Devices: %d\n", info.RaidDevices)
|
|
fmt.Printf(" Raid Devices: %d\n", info.RaidDevices)
|
|
fmt.Printf(" Total Devices: %d\n", info.TotalDevices)
|
|
fmt.Printf(" Total Devices: %d\n", info.TotalDevices)
|
|
fmt.Printf(" Persistence: %s\n", info.Persistence)
|
|
fmt.Printf(" Persistence: %s\n", info.Persistence)
|
|
- fmt.Printf(" Update Time: %s\n", info.UpdateTime.Format("Mon Jan _2 15:04:05 2006"))
|
|
|
|
|
|
+ fmt.Printf(" Update Time: %s\n", info.UpdateTime.Format("Mon Jan 02 15:04:05 2006"))
|
|
fmt.Printf(" State: %s\n", info.State)
|
|
fmt.Printf(" State: %s\n", info.State)
|
|
fmt.Printf(" Active Devices: %d\n", info.ActiveDevices)
|
|
fmt.Printf(" Active Devices: %d\n", info.ActiveDevices)
|
|
fmt.Printf(" Working Devices: %d\n", info.WorkingDevices)
|
|
fmt.Printf(" Working Devices: %d\n", info.WorkingDevices)
|