//go:build windows package app import "golang.org/x/sys/windows" func atomicReplaceSQLAuditFile(source, target string) error { sourcePath, err := windows.UTF16PtrFromString(source) if err != nil { return err } targetPath, err := windows.UTF16PtrFromString(target) if err != nil { return err } return windows.MoveFileEx( sourcePath, targetPath, windows.MOVEFILE_REPLACE_EXISTING|windows.MOVEFILE_WRITE_THROUGH, ) }