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: pet_delete_urlbuilder.go
    path of file: ./repos/go-swagger/examples/contributed-templates/stratoscale/restapi/operations/pet
    
    the code of the file until where you have to start completion: // Code generated by go-swagger; DO NOT EDIT.

package pet

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command

import (
	"errors"
	"net/
    
func (o *PetDeleteURL) Build() (*url.URL, error) {
	var _result url.URL

	var _path = "/pet/{petId}"

	petID := swag.FormatInt64(o.PetID)
	if petID != "" {
		_path = strings.Replace(_path, "{petId}", petID, -1)
	} else {
		return nil, errors.New("petId is required on PetDeleteURL")
	}

	_basePath := o._basePath
	if _basePath == "" {
		_basePath = "/api/v2"
	}
	_result.Path = golangswaggerpaths.Join(_basePath, _path)

	return &_result, nil
}