code: func ValidateThrottleBpsDevice(val string) (*blkiodev.ThrottleDevice, error) {
  	split := strings.SplitN(val, ":", 2)
  	if len(split) != 2 {
  		return nil, fmt.Errorf("bad format: %s", val)
  	}
  	if !strings.HasPrefix(split[0], "/dev/") {
  		return nil, fmt.Errorf("bad format for device path: %s", val)
  	}
  	rate, err := units.RAMInBytes(split[1])
  	if err != nil {
  		return nil, fmt.Errorf("invalid rate for device: %s. The correct format is <device-path>:<number>[<unit>]. Number must be a positive integer. Unit is optional and can be kb, mb, or gb", val)
  	}
  	if rate < 0 {
  		return nil, fmt.Errorf("invalid rate for device: %s. The correct format is <device-path>:<number>[<unit>]. Number must be a positive integer. Unit is optional and can be kb, mb, or gb", val)
  	}
  
  	return &blkiodev.ThrottleDevice{
  		Path: split[0],
  		Rate: uint64(rate),
  	}, nil
  }
docs: // ValidateThrottleBpsDevice validates that the specified string has a valid device-rate format.