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
@@ -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
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
@@ -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
@@ -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
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
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
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
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
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
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
@@ -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
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
@@ -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
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
@@ -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
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
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
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
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
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
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
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
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
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
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
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
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.