You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: disk.go
    path of file: ./repos/hubble-ui/backend/vendor/github.com/lufia/plan9stats
    
    the code of the file until where you have to start completion: package stats

import (
	"bufio"
	"bytes"
	"context"
	"os"
	"path/filepath"
	"strings"
)

// Storage represents /dev/sdXX/ctl.
type Storage struct {
	Name       string
	Model      string
	Capacity   int64
	Partitions []*Partition
}

// Partition represents a part of /dev/sdXX/ctl.
type Partition struct {
	Name  string
	Start uint64
	End   uint64
}

func ReadStorages(ctx context.Context, opts ...Option) ([]*Storage, error) {
	cfg := newConfig(opts...)
	sdctl := filepath.Join(cfg.rootdir, "/dev/sdctl")
	f, err := os.Open(sdctl)

    
func ReadStorages(ctx context.Context, opts ...Option) ([]*Storage, error) {
	cfg := newConfig(opts...)
	sdctl := filepath.Join(cfg.rootdir, "/dev/sdctl")
	f, err := os.Open(sdctl)
	if err != nil {
		return nil, err
	}
	defer f.Close()

	var a []*Storage
	scanner := bufio.NewScanner(f)
	for scanner.Scan() {
		fields := bytes.Split(scanner.Bytes(), delim)
		if len(fields) == 0 {
			continue
		}
		exp := string(fields[0]) + "*"
		if !strings.HasPrefix(exp, "sd") {
			continue
		}
		dir := filepath.Join(cfg.rootdir, "/dev", exp)
		m, err := filepath.Glob(dir)
		if err != nil {
			return nil, err
		}
		for _, dir := range m {
			s, err := readStorage(dir)
			if err != nil {
				return nil, err
			}
			a = append(a, s)
		}
	}
	if err := scanner.Err(); err != nil {
		return nil, err
	}
	return a, nil
}