Skip to content

Commit

Permalink
*: rename project to src-d/go-billy to go-git/go-billy/v5
Browse files Browse the repository at this point in the history
  • Loading branch information
mcuadros committed Mar 9, 2020
1 parent 24ded68 commit 205ba65
Show file tree
Hide file tree
Showing 30 changed files with 70 additions and 114 deletions.
25 changes: 0 additions & 25 deletions DCO

This file was deleted.

1 change: 0 additions & 1 deletion MAINTAINERS

This file was deleted.

25 changes: 0 additions & 25 deletions Makefile

This file was deleted.

9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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`.

Expand Down
4 changes: 2 additions & 2 deletions fs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
9 changes: 5 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -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
17 changes: 11 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
@@ -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=
4 changes: 2 additions & 2 deletions helper/chroot/chroot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions helper/chroot/chroot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
4 changes: 2 additions & 2 deletions helper/mount/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions helper/mount/mount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion helper/polyfill/polyfill.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions helper/polyfill/polyfill_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
4 changes: 2 additions & 2 deletions helper/temporal/temporal.go
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions helper/temporal/temporal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
8 changes: 4 additions & 4 deletions memfs/memory.go
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions memfs/memory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
6 changes: 3 additions & 3 deletions osfs/os.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// 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"
"os"
"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 (
Expand Down
4 changes: 2 additions & 2 deletions osfs/os_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
4 changes: 2 additions & 2 deletions test/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/chroot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions test/symlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/tempfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion util/glob.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions util/glob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down
2 changes: 1 addition & 1 deletion util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions util/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 205ba65

Please sign in to comment.