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: stat.pb.go
    path of file: ./repos/moby/vendor/github.com/tonistiigi/fsutil/types
    
    the code of the file until where you have to start completion: // Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: stat.proto

package types

import (
	bytes "bytes"
	fmt "fmt"
	proto "github.com/gogo/protobuf/proto"
	g
    
func (this *Stat) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*Stat)
	if !ok {
		that2, ok := that.(Stat)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if this.Path != that1.Path {
		return false
	}
	if this.Mode != that1.Mode {
		return false
	}
	if this.Uid != that1.Uid {
		return false
	}
	if this.Gid != that1.Gid {
		return false
	}
	if this.Size_ != that1.Size_ {
		return false
	}
	if this.ModTime != that1.ModTime {
		return false
	}
	if this.Linkname != that1.Linkname {
		return false
	}
	if this.Devmajor != that1.Devmajor {
		return false
	}
	if this.Devminor != that1.Devminor {
		return false
	}
	if len(this.Xattrs) != len(that1.Xattrs) {
		return false
	}
	for i := range this.Xattrs {
		if !bytes.Equal(this.Xattrs[i], that1.Xattrs[i]) {
			return false
		}
	}
	return true
}