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: duplicate.go
    path of file: ./repos/wgnetwork/vendor/github.com/miekg/dns
    
    the code of the file until where you have to start completion: package dns

//go:generate go run duplicate_generate.go

// IsDuplicate checks of r1 and r2 are duplicates of each other, excludi
    
func IsDuplicate(r1, r2 RR) bool {
	// Check whether the record header is identical.
	if !r1.Header().isDuplicate(r2.Header()) {
		return false
	}

	// Check whether the RDATA is identical.
	return r1.isDuplicate(r2)
}