// Load returns the list of partition found and their properties.
func (l *LinuxLoader) Load() ([]*Properties, error) {
//-
ret := []*Properties{}
if temp, err := runDf(); err != nil {
return ret, err
} else {
ret = PropertiesList(ret).Append(PropertiesList(temp))
}
//-
if temp, err := runLsLabel(); err != nil {
return ret, err
} else {
ret = PropertiesList(ret).Append(PropertiesList(temp))
}
//-
if temp, err := runLsUsb(); err != nil {
return ret, err
} else {
ret = PropertiesList(ret).Merge(PropertiesList(temp), "IsRemovable")
}
//-
if temp, err := runMount(); err != nil {
return ret, err
} else {
ret = PropertiesList(ret).Merge(PropertiesList(temp), "Label")
}
//-
return ret, nil
}--You received this message because you are subscribed to the Google Groups "golang-nuts" group.To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.For more options, visit https://groups.google.com/d/optout.
// Load returns the list of partition found and their properties.
func (l *LinuxLoader) Load() ([]*Properties, error) {
//-
ret := []*Properties{}
if temp, err := runDf(); err != nil {
return ret, err
}
ret = PropertiesList(ret).Append(PropertiesList(temp))
...
// Load returns the list of partition found and their properties.
func (l *LinuxLoader) Load() ([]*Properties, error) {
//-
ret := []*Properties{}
if temp, err := runDf(); err != nil {
return ret, err
}
ret = PropertiesList(ret).Append(PropertiesList(temp))
//-
if temp, err := runLsLabel(); err != nil {
return ret, err
} else {
ret = PropertiesList(ret).Append(PropertiesList(temp))
}
//-
if temp, err := runLsUsb(); err != nil {
return ret, err
} else {
ret = PropertiesList(ret).Merge(PropertiesList(temp), "IsRemovable")
}
//-
if temp, err := runMount(); err != nil {
return ret, err
} else {
ret = PropertiesList(ret).Merge(PropertiesList(temp), "Label")
}
//-
return ret, nil
}