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: ipam.go
    path of file: ./repos/buildkit/vendor/github.com/docker/docker/api/types/network
    
    the code of the file until where you have to start completion: package network

import (
	"errors"
	"fmt"
	"net/netip"

	"github.com/docker/docker/internal/multierror"
)

// 
    
func validateIPRange(ipRange string, subnet netip.Prefix, subnetFamily ipFamily) []error {
	if ipRange == "" {
		return nil
	}
	prefix, err := netip.ParsePrefix(ipRange)
	if err != nil {
		return []error{fmt.Errorf("invalid ip-range %s: invalid CIDR block notation", ipRange)}
	}
	family := ip4
	if prefix.Addr().Is6() {
		family = ip6
	}

	if family != subnetFamily {
		return []error{fmt.Errorf("invalid ip-range %s: parent subnet is an %s block", ipRange, subnetFamily)}
	}

	var errs []error
	if prefix.Bits() < subnet.Bits() {
		errs = append(errs, fmt.Errorf("invalid ip-range %s: CIDR block is bigger than its parent subnet %s", ipRange, subnet))
	}
	if prefix != prefix.Masked() {
		errs = append(errs, fmt.Errorf("invalid ip-range %s: it should be %s", prefix, prefix.Masked()))
	}
	if !subnet.Overlaps(prefix) {
		errs = append(errs, fmt.Errorf("invalid ip-range %s: parent subnet %s doesn't contain ip-range", ipRange, subnet))
	}

	return errs
}