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: poller.go
    path of file: ./repos/comply/vendor/github.com/gohugoio/hugo/watcher/filenotify
    
    the code of the file until where you have to start completion: // Package filenotify is adapted from https://github.com/moby/moby/tree/master/pkg/filenotify, Apache-2.0 License.
// Hopefully this can be replaced with an external package sometime in the future, see https://github
    
func checkChange(fi1, fi2 os.FileInfo) fsnotify.Op {
	if fi1 == nil && fi2 != nil {
		return fsnotify.Create
	}
	if fi1 != nil && fi2 == nil {
		return fsnotify.Remove
	}
	if fi1 == nil && fi2 == nil {
		return 0
	}
	if fi1.IsDir() || fi2.IsDir() {
		return 0
	}
	if fi1.Mode() != fi2.Mode() {
		return fsnotify.Chmod
	}
	if fi1.ModTime() != fi2.ModTime() || fi1.Size() != fi2.Size() {
		return fsnotify.Write
	}

	return 0
}