golang.org/x/tools@v0.21.1-0.20240520172518-788d39e776b1/internal/robustio/robustio_other.go (about) 1 // Copyright 2019 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build !windows && !darwin 6 // +build !windows,!darwin 7 8 package robustio 9 10 import ( 11 "os" 12 ) 13 14 func rename(oldpath, newpath string) error { 15 return os.Rename(oldpath, newpath) 16 } 17 18 func readFile(filename string) ([]byte, error) { 19 return os.ReadFile(filename) 20 } 21 22 func removeAll(path string) error { 23 return os.RemoveAll(path) 24 } 25 26 func isEphemeralError(err error) bool { 27 return false 28 }