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: errors.go
    path of file: ./repos/azure-sdk-for-go/sdk/messaging/azservicebus/internal
    
    the code of the file until where you have to start completion: // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package internal

import (
	"context"
	"errors"
	"fmt"
	"io"
	"net"
	"net/http"
	"reflect"
	"strings"

	"github.com/Azure/azure-sdk-for-go/sdk/messaging/azser
    
func isLockLostError(err error) bool {
	var rpcErr RPCError

	// this is the error you get if you settle on the management$ link
	// with an expired locktoken.
	if errors.As(err, &rpcErr) && rpcErr.Resp.Code == RPCResponseCodeLockLost {
		return true
	}

	var amqpErr *amqp.Error

	// this is the error you get if you settle on the actual receiver link you
	// got the message on with an expired locktoken.
	if errors.As(err, &amqpErr) && amqpErr.Condition == errorConditionLockLost {
		return true
	}

	return false
}