This site is being rebuilt and some pages are out of date. For current details, write to [email protected]. This notice goes away when the rebuild is done.

No analytics unless you allow it, no tracking. This site keeps in your browser the language you pick, the theme, its colour, which site you chose, the currency on the pricing page and that you closed this notice; signing in adds session cookies. The legal page has the details.

Sign in

Radar · Go · Archive · Week 33 · Aug 11 – 17, 2025

syscall: add Open O_* flags for Windows FILE_FLAG_* flags

Worth knowingecosystem

What changed
New constants such as O_FILE_FLAG_OPEN_NO_RECALL were added to golang.org/x/sys/windows, and syscall.Open on Windows now accepts them and rejects unknown bits.
Production impact
The source does not say.
Try it
On Windows, call syscall.Open with O_FILE_FLAG_OPEN_NO_RECALL and observe that the flag is passed to the OS.
Source
github.com/golang/go/issues/73676

Understand it, then run it

On Windows, the syscall.Open function can now accept a set of flags that match the native FILE_FLAG_* options. These flags let you control how a file is opened, for example whether the file is opened for overlapped (asynchronous) I/O or whether the file should be deleted when the last handle is closed. The change adds constants such as O_FILE_FLAG_OPEN_NO_RECALL to the golang.org/x/sys/windows package, and syscall.Open will pass those flags straight to the operating system. If you try to pass a flag that the runtime does not understand, syscall.Open will return an error instead of silently ignoring the bit.

Written by gpt-oss-20b from the linked source · claims checked against the sources · archive, not individually reviewed