in internal/diskutil/diskutil.go [363:380]
func list(ctx context.Context, util UtilImpl, decoder Decoder, args []string) (*types.SystemPartitions, error) {
// Fetch the raw list information from the util
rawPartitions, err := util.List(ctx, args)
if err != nil {
return nil, err
}
// Create a reader for the raw data
reader := strings.NewReader(rawPartitions)
// Decode the raw data into a more usable SystemPartitions struct
partitions, err := decoder.DecodeSystemPartitions(reader)
if err != nil {
return nil, err
}
return partitions, nil
}