github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/not-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 // +build !windows,!darwin 6 7 package robustio 8 9 import ( 10 "io/ioutil" 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 ioutil.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 }