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: watcher_kqueue.go
    path of file: ./repos/devspace/vendor/github.com/loft-sh/notify
    
    the code of the file until where you have to start completion: // Copyright (c) 2014-2015 The Notify Authors. All rights reserved.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.

// +build darwin,kqueue darwin,!cgo dragonfly freebsd netbsd openbsd

package notify

import (
	"fmt"
	"os"
	"syscall"
)

// newTrigger returns implementation of trigger.
func newTrigger(pthLkp map[string]*watched) trigger {
	return &kq{
		pthLkp: pthLkp,
		idLkp:  make(map[int]*watched),
	}
}

// kq is a structure implementing trigger for kqueue.
type kq struct {
	// fd 
    
func (*kq) NewWatched(p string, fi os.FileInfo) (*watched, error) {
	fd, err := syscall.Open(p, syscall.O_NONBLOCK|syscall.O_RDONLY, 0)
	if err != nil {
		// BSDs can't open symlinks and return an error if the symlink
		// cannot be followed - ignore it instead of failing. See e.g.
		// https://github.com/libinotify-kqueue/libinotify-kqueue/blob/a822c8f1d75404fe3132f695a898dcd42fe8afbc/patches/freebsd11-O_SYMLINK.patch
		if os.IsNotExist(err) && fi.Mode()&os.ModeSymlink == os.ModeSymlink {
			return nil, errSkip
		}
		return nil, err
	}
	return &watched{
		trgWatched: trgWatched{p: p, fi: fi},
		fd:         fd,
	}, nil
}