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: v10.go
    path of file: ./repos/lotus/chain/actors/builtin/miner
    
    the code of the file until where you have to start completion: package miner

import (
	"bytes"
	"errors"
	"fmt"

	"github.com/ipfs/go-cid"
	cbg "github.com/whyrusleeping/cbor-gen"
	"golang.org/x/xerrors"

	"githu
    
func (s *state10) LoadSectors(snos *bitfield.BitField) ([]*SectorOnChainInfo, error) {
	sectors, err := miner10.LoadSectors(s.store, s.State.Sectors)
	if err != nil {
		return nil, err
	}

	// If no sector numbers are specified, load all.
	if snos == nil {
		infos := make([]*SectorOnChainInfo, 0, sectors.Length())
		var info10 miner10.SectorOnChainInfo
		if err := sectors.ForEach(&info10, func(_ int64) error {
			info := fromV10SectorOnChainInfo(info10)
			infos = append(infos, &info)
			return nil
		}); err != nil {
			return nil, err
		}
		return infos, nil
	}

	// Otherwise, load selected.
	infos10, err := sectors.Load(*snos)
	if err != nil {
		return nil, err
	}
	infos := make([]*SectorOnChainInfo, len(infos10))
	for i, info10 := range infos10 {
		info := fromV10SectorOnChainInfo(*info10)
		infos[i] = &info
	}
	return infos, nil
}