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