mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-29 18:38:33 +00:00
14 lines
245 B
Go
14 lines
245 B
Go
package utils
|
|
|
|
import "os"
|
|
|
|
// RemoveIgnoreNonExistent removes a file, ignoring if it doesn't exist.
|
|
func RemoveIgnoreNonExistent(file string) error {
|
|
err := os.Remove(file)
|
|
if err == nil || os.IsNotExist(err) {
|
|
return nil
|
|
}
|
|
|
|
return err
|
|
}
|