in internal/diskutil/diskutil.go [343:360]
func info(ctx context.Context, util UtilImpl, decoder Decoder, id string) (*types.DiskInfo, error) {
// Fetch the raw disk information from the util
rawDisk, err := util.Info(ctx, id)
if err != nil {
return nil, err
}
// Create a reader for the raw data
reader := strings.NewReader(rawDisk)
// Decode the raw data into a more usable DiskInfo struct
disk, err := decoder.DecodeDiskInfo(reader)
if err != nil {
return nil, err
}
return disk, nil
}