On Tue, Mar 18, 2025 at 8:28 AM Jason E. Aten <j.e.a...@gmail.com> wrote:
> Thank you so much, Ian. > > On Tuesday, March 18, 2025 at 2:21:37 PM UTC Ian Lance Taylor wrote: > > Or in this case it seems simpler to just use the unix.FcntlFstore > function which already exists and does the right thing. > > > I think I may have stumbled on/been tripped up by a bug in pkg.go.dev > then, > because when I looked there, I did not see unix.FcntlFstore(). The > list was simply these two: FcntlFlock, and FcntlInt. Copy and pasting it: > > *...* > > > > *func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err > error)func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) errorfunc > FcntlInt(fd uintptr, cmd, arg int) (int, error)func FdToClockID(fd int) > int32* > *...* > > with no FcntlFstore in sight. (Apologies for the screenshot attached, but > it provides perhaps believable evidence of the same claim). > > Is it worth filing a bug on pkg.go.dev for this? Or maybe there is a way > I don't > know about to have the darwin-specific calls show up in pkg.go.dev? > It's definitely awkward for packages like x/sys/unix that provide a different API depending on the target. If you look over on the right and scroll down a bit, you'll see a "Rendered for" drop down selection. If you select darwin/amd64, you'll be redirected to https://pkg.go.dev/golang.org/x/sys/unix?GOOS=darwin, which does show the function: https://pkg.go.dev/golang.org/x/sys/unix?GOOS=darwin#FcntlFstore . It would be nice if this could be clearer. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcXz8dLn2ky-FPvN9nZHcrUEOxNGmXUf4Sp6Znx_8QTF2Q%40mail.gmail.com.