From 205ba6585ca03bd60e304f7fa0b270232ba1d707 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ximo=20Cuadros?= Date: Mon, 9 Mar 2020 21:00:45 +0100 Subject: [PATCH] *: rename project to src-d/go-billy to go-git/go-billy/v5 --- DCO | 25 ------------------------- MAINTAINERS | 1 - Makefile | 25 ------------------------- README.md | 9 +++++---- fs_test.go | 4 ++-- go.mod | 9 +++++---- go.sum | 17 +++++++++++------ helper/chroot/chroot.go | 4 ++-- helper/chroot/chroot_test.go | 4 ++-- helper/mount/mount.go | 4 ++-- helper/mount/mount_test.go | 8 ++++---- helper/polyfill/polyfill.go | 2 +- helper/polyfill/polyfill_test.go | 4 ++-- helper/temporal/temporal.go | 4 ++-- helper/temporal/temporal_test.go | 4 ++-- memfs/memory.go | 8 ++++---- memfs/memory_test.go | 4 ++-- osfs/os.go | 6 +++--- osfs/os_test.go | 4 ++-- test/basic.go | 4 ++-- test/chroot.go | 4 ++-- test/dir.go | 4 ++-- test/fs.go | 4 ++-- test/mock.go | 2 +- test/symlink.go | 4 ++-- test/tempfile.go | 4 ++-- util/glob.go | 2 +- util/glob_test.go | 4 ++-- util/util.go | 2 +- util/util_test.go | 4 ++-- 30 files changed, 70 insertions(+), 114 deletions(-) delete mode 100644 DCO delete mode 100644 MAINTAINERS delete mode 100644 Makefile diff --git a/DCO b/DCO deleted file mode 100644 index 29c1b92..0000000 --- a/DCO +++ /dev/null @@ -1,25 +0,0 @@ - Developer's Certificate of Origin 1.1 - - By making a contribution to this project, I certify that: - - (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - - (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - - (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - - (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. diff --git a/MAINTAINERS b/MAINTAINERS deleted file mode 100644 index 8dbba47..0000000 --- a/MAINTAINERS +++ /dev/null @@ -1 +0,0 @@ -Máximo Cuadros (@mcuadros) diff --git a/Makefile b/Makefile deleted file mode 100644 index 19e7433..0000000 --- a/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# General -WORKDIR = $(PWD) - -# Go parameters -GOCMD = go -GOTEST = $(GOCMD) test -v - -# Coverage -COVERAGE_REPORT = coverage.txt -COVERAGE_PROFILE = profile.out -COVERAGE_MODE = atomic - -test-coverage: - cd $(WORKDIR); \ - echo "" > $(COVERAGE_REPORT); \ - for dir in `find . -name "*.go" | grep -o '.*/' | sort | uniq`; do \ - $(GOTEST) $$dir -coverprofile=$(COVERAGE_PROFILE) -covermode=$(COVERAGE_MODE); \ - if [ $$? != 0 ]; then \ - exit 2; \ - fi; \ - if [ -f $(COVERAGE_PROFILE) ]; then \ - cat $(COVERAGE_PROFILE) >> $(COVERAGE_REPORT); \ - rm $(COVERAGE_PROFILE); \ - fi; \ - done; \ diff --git a/README.md b/README.md index ae4a3f8..ca58b1c 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,21 @@ -# go-billy [![GoDoc](https://godoc.org/gopkg.in/src-d/go-billy.v4?status.svg)](https://godoc.org/gopkg.in/src-d/go-billy.v4) [![Build Status](https://travis-ci.com/src-d/go-billy.svg)](https://travis-ci.com/src-d/go-billy) [![Build status](https://ci.appveyor.com/api/projects/status/vx2qn6vlakbi724t?svg=true)](https://ci.appveyor.com/project/mcuadros/go-billy) [![codecov](https://codecov.io/gh/src-d/go-billy/branch/master/graph/badge.svg)](https://codecov.io/gh/src-d/go-billy) +# go-billy [![GoDoc](https://godoc.org/gopkg.in/go-git/go-billy.v5?status.svg)](https://pkg.go.dev/github.com/go-git/go-billy) [![Test](https://github.com/go-git/go-billy/workflows/Test/badge.svg)](https://github.com/go-git/go-billy/actions?query=workflow%3ATest) The missing interface filesystem abstraction for Go. Billy implements an interface based on the `os` standard library, allowing to develop applications without dependency on the underlying storage. Makes it virtually free to implement mocks and testing over filesystem operations. -Billy was born as part of [src-d/go-git](https://github.com/src-d/go-git) project. +Billy was born as part of [go-git/go-git](https://github.com/go-git/go-git) project. ## Installation ```go -go get -u gopkg.in/src-d/go-billy.v4/... +import "github.com/go-git/go-billy/v5" // with go modules enabled (GO111MODULE=on or outside GOPATH) +import "github.com/go-git/go-billy" // with go modules disabled ``` ## Usage Billy exposes filesystems using the -[`Filesystem` interface](https://godoc.org/github.com/src-d/go-billy#Filesystem). +[`Filesystem` interface](https://pkg.go.dev/github.com/go-git/go-billy/v5?tab=doc#Filesystem). Each filesystem implementation gives you a `New` method, whose arguments depend on the implementation itself, that returns a new `Filesystem`. diff --git a/fs_test.go b/fs_test.go index 368eb95..5670d2c 100644 --- a/fs_test.go +++ b/fs_test.go @@ -3,8 +3,8 @@ package billy_test import ( "testing" - . "gopkg.in/src-d/go-billy.v4" - "gopkg.in/src-d/go-billy.v4/test" + . "github.com/go-git/go-billy/v5" + "github.com/go-git/go-billy/v5/test" . "gopkg.in/check.v1" ) diff --git a/go.mod b/go.mod index 0d51708..78ce0af 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,10 @@ -module gopkg.in/src-d/go-billy.v4 +module github.com/go-git/go-billy/v5 require ( - github.com/kr/pretty v0.1.0 // indirect - golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e - gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 + github.com/kr/text v0.2.0 // indirect + github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect + golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 + gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f ) go 1.13 diff --git a/go.sum b/go.sum index e77a3db..cdc052b 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,14 @@ -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/go-git/go-billy v1.0.0 h1:bXR6Zu3opPSg0R4dDxqaLglY4rxw7ja7wS16qSpOKL4= +github.com/go-git/go-billy v3.1.0+incompatible h1:dwrJ8G2Jt1srYgIJs+lRjA36qBY68O2Lg5idKG8ef5M= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e h1:D5TXcfTk7xF7hvieo4QErS3qqCB4teTffacDWr7CI+0= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/helper/chroot/chroot.go b/helper/chroot/chroot.go index 44ddb3d..8b44e78 100644 --- a/helper/chroot/chroot.go +++ b/helper/chroot/chroot.go @@ -5,8 +5,8 @@ import ( "path/filepath" "strings" - "gopkg.in/src-d/go-billy.v4" - "gopkg.in/src-d/go-billy.v4/helper/polyfill" + "github.com/go-git/go-billy/v5" + "github.com/go-git/go-billy/v5/helper/polyfill" ) // ChrootHelper is a helper to implement billy.Chroot. diff --git a/helper/chroot/chroot_test.go b/helper/chroot/chroot_test.go index 819b000..2f81c25 100644 --- a/helper/chroot/chroot_test.go +++ b/helper/chroot/chroot_test.go @@ -5,8 +5,8 @@ import ( "path/filepath" "testing" - "gopkg.in/src-d/go-billy.v4" - "gopkg.in/src-d/go-billy.v4/test" + "github.com/go-git/go-billy/v5" + "github.com/go-git/go-billy/v5/test" . "gopkg.in/check.v1" ) diff --git a/helper/mount/mount.go b/helper/mount/mount.go index 83f7dd5..2c14911 100644 --- a/helper/mount/mount.go +++ b/helper/mount/mount.go @@ -8,8 +8,8 @@ import ( "fmt" - "gopkg.in/src-d/go-billy.v4" - "gopkg.in/src-d/go-billy.v4/helper/polyfill" + "github.com/go-git/go-billy/v5" + "github.com/go-git/go-billy/v5/helper/polyfill" ) var separator = string(filepath.Separator) diff --git a/helper/mount/mount_test.go b/helper/mount/mount_test.go index ba558f3..ec09f05 100644 --- a/helper/mount/mount_test.go +++ b/helper/mount/mount_test.go @@ -5,10 +5,10 @@ import ( "path/filepath" "testing" - "gopkg.in/src-d/go-billy.v4" - "gopkg.in/src-d/go-billy.v4/memfs" - "gopkg.in/src-d/go-billy.v4/test" - "gopkg.in/src-d/go-billy.v4/util" + "github.com/go-git/go-billy/v5" + "github.com/go-git/go-billy/v5/memfs" + "github.com/go-git/go-billy/v5/test" + "github.com/go-git/go-billy/v5/util" . "gopkg.in/check.v1" ) diff --git a/helper/polyfill/polyfill.go b/helper/polyfill/polyfill.go index f613c25..1efce0e 100644 --- a/helper/polyfill/polyfill.go +++ b/helper/polyfill/polyfill.go @@ -4,7 +4,7 @@ import ( "os" "path/filepath" - "gopkg.in/src-d/go-billy.v4" + "github.com/go-git/go-billy/v5" ) // Polyfill is a helper that implements all missing method from billy.Filesystem. diff --git a/helper/polyfill/polyfill_test.go b/helper/polyfill/polyfill_test.go index 2579ed9..b0df9a7 100644 --- a/helper/polyfill/polyfill_test.go +++ b/helper/polyfill/polyfill_test.go @@ -4,8 +4,8 @@ import ( "path/filepath" "testing" - "gopkg.in/src-d/go-billy.v4" - "gopkg.in/src-d/go-billy.v4/test" + "github.com/go-git/go-billy/v5" + "github.com/go-git/go-billy/v5/test" . "gopkg.in/check.v1" ) diff --git a/helper/temporal/temporal.go b/helper/temporal/temporal.go index 05e2b8f..393dac1 100644 --- a/helper/temporal/temporal.go +++ b/helper/temporal/temporal.go @@ -1,8 +1,8 @@ package temporal import ( - "gopkg.in/src-d/go-billy.v4" - "gopkg.in/src-d/go-billy.v4/util" + "github.com/go-git/go-billy/v5" + "github.com/go-git/go-billy/v5/util" ) // Temporal is a helper that implements billy.TempFile over any filesystem. diff --git a/helper/temporal/temporal_test.go b/helper/temporal/temporal_test.go index cf9b95b..c611a13 100644 --- a/helper/temporal/temporal_test.go +++ b/helper/temporal/temporal_test.go @@ -4,8 +4,8 @@ import ( "strings" "testing" - "gopkg.in/src-d/go-billy.v4/memfs" - "gopkg.in/src-d/go-billy.v4/test" + "github.com/go-git/go-billy/v5/memfs" + "github.com/go-git/go-billy/v5/test" . "gopkg.in/check.v1" ) diff --git a/memfs/memory.go b/memfs/memory.go index 7eab699..d4ac056 100644 --- a/memfs/memory.go +++ b/memfs/memory.go @@ -1,5 +1,5 @@ // Package memfs provides a billy filesystem base on memory. -package memfs // import "gopkg.in/src-d/go-billy.v4/memfs" +package memfs // import "github.com/go-git/go-billy/v5/memfs" import ( "errors" @@ -10,9 +10,9 @@ import ( "strings" "time" - "gopkg.in/src-d/go-billy.v4" - "gopkg.in/src-d/go-billy.v4/helper/chroot" - "gopkg.in/src-d/go-billy.v4/util" + "github.com/go-git/go-billy/v5" + "github.com/go-git/go-billy/v5/helper/chroot" + "github.com/go-git/go-billy/v5/util" ) const separator = filepath.Separator diff --git a/memfs/memory_test.go b/memfs/memory_test.go index be278a2..1ec74b8 100644 --- a/memfs/memory_test.go +++ b/memfs/memory_test.go @@ -4,8 +4,8 @@ import ( "io" "testing" - "gopkg.in/src-d/go-billy.v4" - "gopkg.in/src-d/go-billy.v4/test" + "github.com/go-git/go-billy/v5" + "github.com/go-git/go-billy/v5/test" . "gopkg.in/check.v1" ) diff --git a/osfs/os.go b/osfs/os.go index e9d6d00..880389f 100644 --- a/osfs/os.go +++ b/osfs/os.go @@ -1,5 +1,5 @@ // Package osfs provides a billy filesystem for the OS. -package osfs // import "gopkg.in/src-d/go-billy.v4/osfs" +package osfs // import "github.com/go-git/go-billy/v5/osfs" import ( "io/ioutil" @@ -7,8 +7,8 @@ import ( "path/filepath" "sync" - "gopkg.in/src-d/go-billy.v4" - "gopkg.in/src-d/go-billy.v4/helper/chroot" + "github.com/go-git/go-billy/v5" + "github.com/go-git/go-billy/v5/helper/chroot" ) const ( diff --git a/osfs/os_test.go b/osfs/os_test.go index 69b4780..18e1397 100644 --- a/osfs/os_test.go +++ b/osfs/os_test.go @@ -7,8 +7,8 @@ import ( "runtime" "testing" - "gopkg.in/src-d/go-billy.v4" - "gopkg.in/src-d/go-billy.v4/test" + "github.com/go-git/go-billy/v5" + "github.com/go-git/go-billy/v5/test" . "gopkg.in/check.v1" ) diff --git a/test/basic.go b/test/basic.go index 1d5428b..ec569dc 100644 --- a/test/basic.go +++ b/test/basic.go @@ -9,8 +9,8 @@ import ( "path/filepath" . "gopkg.in/check.v1" - . "gopkg.in/src-d/go-billy.v4" - "gopkg.in/src-d/go-billy.v4/util" + . "github.com/go-git/go-billy/v5" + "github.com/go-git/go-billy/v5/util" ) // BasicSuite is a convenient test suite to validate any implementation of diff --git a/test/chroot.go b/test/chroot.go index 863c953..563db63 100644 --- a/test/chroot.go +++ b/test/chroot.go @@ -4,8 +4,8 @@ import ( "os" . "gopkg.in/check.v1" - . "gopkg.in/src-d/go-billy.v4" - "gopkg.in/src-d/go-billy.v4/util" + . "github.com/go-git/go-billy/v5" + "github.com/go-git/go-billy/v5/util" ) // ChrootSuite is a convenient test suite to validate any implementation of diff --git a/test/dir.go b/test/dir.go index 5644515..78ccff8 100644 --- a/test/dir.go +++ b/test/dir.go @@ -5,8 +5,8 @@ import ( "strconv" . "gopkg.in/check.v1" - . "gopkg.in/src-d/go-billy.v4" - "gopkg.in/src-d/go-billy.v4/util" + . "github.com/go-git/go-billy/v5" + "github.com/go-git/go-billy/v5/util" ) // DirSuite is a convenient test suite to validate any implementation of diff --git a/test/fs.go b/test/fs.go index 4157983..82916dc 100644 --- a/test/fs.go +++ b/test/fs.go @@ -5,8 +5,8 @@ import ( "runtime" . "gopkg.in/check.v1" - . "gopkg.in/src-d/go-billy.v4" - "gopkg.in/src-d/go-billy.v4/util" + . "github.com/go-git/go-billy/v5" + "github.com/go-git/go-billy/v5/util" ) // FilesystemSuite is a convenient test suite to validate any implementation of diff --git a/test/mock.go b/test/mock.go index 519bba6..40cbbf5 100644 --- a/test/mock.go +++ b/test/mock.go @@ -6,7 +6,7 @@ import ( "path" "path/filepath" - "gopkg.in/src-d/go-billy.v4" + "github.com/go-git/go-billy/v5" ) type BasicMock struct { diff --git a/test/symlink.go b/test/symlink.go index 1ae77ab..99143a4 100644 --- a/test/symlink.go +++ b/test/symlink.go @@ -6,8 +6,8 @@ import ( "runtime" . "gopkg.in/check.v1" - . "gopkg.in/src-d/go-billy.v4" - "gopkg.in/src-d/go-billy.v4/util" + . "github.com/go-git/go-billy/v5" + "github.com/go-git/go-billy/v5/util" ) // SymlinkSuite is a convenient test suite to validate any implementation of diff --git a/test/tempfile.go b/test/tempfile.go index ed3fb8f..5a6d56d 100644 --- a/test/tempfile.go +++ b/test/tempfile.go @@ -4,8 +4,8 @@ import ( "strings" . "gopkg.in/check.v1" - "gopkg.in/src-d/go-billy.v4" - "gopkg.in/src-d/go-billy.v4/util" + "github.com/go-git/go-billy/v5" + "github.com/go-git/go-billy/v5/util" ) // TempFileSuite is a convenient test suite to validate any implementation of diff --git a/util/glob.go b/util/glob.go index fdcb3e5..f7cb1de 100644 --- a/util/glob.go +++ b/util/glob.go @@ -5,7 +5,7 @@ import ( "sort" "strings" - "gopkg.in/src-d/go-billy.v4" + "github.com/go-git/go-billy/v5" ) // Glob returns the names of all files matching pattern or nil diff --git a/util/glob_test.go b/util/glob_test.go index 5cc60db..2cd73ae 100644 --- a/util/glob_test.go +++ b/util/glob_test.go @@ -6,8 +6,8 @@ import ( "testing" . "gopkg.in/check.v1" - "gopkg.in/src-d/go-billy.v4/memfs" - "gopkg.in/src-d/go-billy.v4/util" + "github.com/go-git/go-billy/v5/memfs" + "github.com/go-git/go-billy/v5/util" ) func Test(t *testing.T) { TestingT(t) } diff --git a/util/util.go b/util/util.go index cf7fb57..34c1d9e 100644 --- a/util/util.go +++ b/util/util.go @@ -8,7 +8,7 @@ import ( "sync" "time" - "gopkg.in/src-d/go-billy.v4" + "github.com/go-git/go-billy/v5" ) // RemoveAll removes path and any children it contains. It removes everything it diff --git a/util/util_test.go b/util/util_test.go index 92a8ca0..7b01db9 100644 --- a/util/util_test.go +++ b/util/util_test.go @@ -6,8 +6,8 @@ import ( "regexp" "testing" - "gopkg.in/src-d/go-billy.v4/memfs" - "gopkg.in/src-d/go-billy.v4/util" + "github.com/go-git/go-billy/v5/memfs" + "github.com/go-git/go-billy/v5/util" ) func TestTempFile(t *testing.T) {