diff options
author | dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> | 2021-03-10 09:17:58 +0000 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2021-03-12 06:15:31 -0500 |
commit | 12fb9e46538621ed494f692085e3c567822262da (patch) | |
tree | f49dcc608f2e3f742a01ab7d04f94e06bde75c64 /vendor/github.com/magefile/mage/sh/helpers.go | |
parent | 81737b37738dfa21be3cf9775919458523511ae9 (diff) | |
download | podman-12fb9e46538621ed494f692085e3c567822262da.tar.gz podman-12fb9e46538621ed494f692085e3c567822262da.tar.bz2 podman-12fb9e46538621ed494f692085e3c567822262da.zip |
Bump github.com/sirupsen/logrus from 1.8.0 to 1.8.1
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.8.0...v1.8.1)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/magefile/mage/sh/helpers.go')
-rw-r--r-- | vendor/github.com/magefile/mage/sh/helpers.go | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/vendor/github.com/magefile/mage/sh/helpers.go b/vendor/github.com/magefile/mage/sh/helpers.go deleted file mode 100644 index f5d20a271..000000000 --- a/vendor/github.com/magefile/mage/sh/helpers.go +++ /dev/null @@ -1,40 +0,0 @@ -package sh - -import ( - "fmt" - "io" - "os" -) - -// Rm removes the given file or directory even if non-empty. It will not return -// an error if the target doesn't exist, only if the target cannot be removed. -func Rm(path string) error { - err := os.RemoveAll(path) - if err == nil || os.IsNotExist(err) { - return nil - } - return fmt.Errorf(`failed to remove %s: %v`, path, err) -} - -// Copy robustly copies the source file to the destination, overwriting the destination if necessary. -func Copy(dst string, src string) error { - from, err := os.Open(src) - if err != nil { - return fmt.Errorf(`can't copy %s: %v`, src, err) - } - defer from.Close() - finfo, err := from.Stat() - if err != nil { - return fmt.Errorf(`can't stat %s: %v`, src, err) - } - to, err := os.OpenFile(dst, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, finfo.Mode()) - if err != nil { - return fmt.Errorf(`can't copy to %s: %v`, dst, err) - } - defer to.Close() - _, err = io.Copy(to, from) - if err != nil { - return fmt.Errorf(`error copying %s to %s: %v`, src, dst, err) - } - return nil -} |