Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Windows support #20

Merged
merged 1 commit into from
Sep 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ correct sequence of operations hard to identify:
This package attempts to get all of these details right, provides an intuitive,
yet flexible API and caters to use-cases where high performance is required.

## Windows support

It is [not possible to reliably write files atomically on
Windows](https://github.com/golang/go/issues/22397#issuecomment-498856679), and
[`chmod` is not reliably supported by the Go standard library on
Windows](https://github.com/google/renameio/issues/17).

As it is not possible to provide a correct implementation, this package does not
export any functions on Windows.

## Disclaimer

This is not an official Google product (experimental or otherwise), it
Expand Down
2 changes: 2 additions & 0 deletions example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// +build !windows

package renameio_test

import (
Expand Down
2 changes: 1 addition & 1 deletion symlink_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
// +build !windows

package renameio

Expand Down
2 changes: 2 additions & 0 deletions tempfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// +build !windows

package renameio

import (
Expand Down
2 changes: 0 additions & 2 deletions tempfile_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// +build linux

package renameio

import (
Expand Down
2 changes: 2 additions & 0 deletions writefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// +build !windows

package renameio

import "os"
Expand Down
2 changes: 1 addition & 1 deletion writefile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
// +build !windows

package renameio

Expand Down