replacing new imports
diff --git a/.travis.yml b/.travis.yml
index 01b51bb..5839b61 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,7 +4,7 @@
- 1.8
- tip
-go_import_path: gopkg.in/src-d/go-billy.v2
+go_import_path: gopkg.in/src-d/go-billy.v3
matrix:
allow_failures:
diff --git a/README.md b/README.md
index f389b53..d7409a8 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# go-billy [](https://godoc.org/gopkg.in/src-d/go-billy.v2) [](https://travis-ci.org/src-d/go-billy) [](https://ci.appveyor.com/project/mcuadros/go-billy) [](https://codecov.io/gh/src-d/go-billy) [](https://codebeat.co/projects/github-com-src-d-go-billy)
+# go-billy [](https://godoc.org/gopkg.in/src-d/go-billy.v3) [](https://travis-ci.org/src-d/go-billy) [](https://ci.appveyor.com/project/mcuadros/go-billy) [](https://codecov.io/gh/src-d/go-billy) [](https://codebeat.co/projects/github-com-src-d-go-billy)
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. Make virtually free implement an mocks and testing over filesystem operations.
@@ -8,7 +8,7 @@
## Installation
```go
-go get -u gopkg.in/src-d/go-billy.v2/...
+go get -u gopkg.in/src-d/go-billy.v3/...
```
## Why billy?
diff --git a/appveyor.yml b/appveyor.yml
index 845cfad..4814a61 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,7 +1,7 @@
version: "{build}"
platform: x64
-clone_folder: c:\gopath\src\gopkg.in\src-d\go-billy.v2
+clone_folder: c:\gopath\src\gopkg.in\src-d\go-billy.v3
environment:
GOPATH: c:\gopath
diff --git a/fs.go b/fs.go
index a6375dc..eb5f7ae 100644
--- a/fs.go
+++ b/fs.go
@@ -29,29 +29,24 @@
type Basic interface {
// Create creates the named file with mode 0666 (before umask), truncating
// it if it already exists. If successful, methods on the returned File can
- // be used for I/O; the associated file descriptor has mode O_RDWR. If there
- // is an error, it will be of type *PathError.
+ // be used for I/O; the associated file descriptor has mode O_RDWR.
Create(filename string) (File, error)
// Open opens the named file for reading. If successful, methods on the
// returned file can be used for reading; the associated file descriptor has
- // mode O_RDONLY. If there is an error, it will be of type *PathError.
+ // mode O_RDONLY.
Open(filename string) (File, error)
// OpenFile is the generalized open call; most users will use Open or Create
// instead. It opens the named file with specified flag (O_RDONLY etc.) and
// perm, (0666 etc.) if applicable. If successful, methods on the returned
- // File can be used for I/O. If there is an error, it will be of type
- // *PathError.
+ // File can be used for I/O.
OpenFile(filename string, flag int, perm os.FileMode) (File, error)
- // Stat returns a FileInfo describing the named file. If there is an error,
- // it will be of type *PathError.
+ // Stat returns a FileInfo describing the named file.
Stat(filename string) (os.FileInfo, error)
// Rename renames (moves) oldpath to newpath. If newpath already exists and
// is not a directory, Rename replaces it. OS-specific restrictions may
- // apply when oldpath and newpath are in different directories. If there is
- // an error, it will be of type *LinkError.
+ // apply when oldpath and newpath are in different directories.
Rename(oldpath, newpath string) error
- // Remove removes the named file or directory. If there is an error, it will
- // be of type *PathError.
+ // Remove removes the named file or directory.
Remove(filename string) error
// Join joins any number of path elements into a single path, adding a
// Separator if necessary. Join calls filepath.Clean on the result; in
@@ -90,16 +85,13 @@
type Symlink interface {
// Lstat returns a FileInfo describing the named file. If the file is a
// symbolic link, the returned FileInfo describes the symbolic link. Lstat
- // makes no attempt to follow the link. If there is an error, it will be of
- // type *PathError.
+ // makes no attempt to follow the link.
Lstat(filename string) (os.FileInfo, error)
// Symlink creates a symbolic-link from link to target. target may be an
// absolute or relative path, and need not refer to an existing node.
- // Parent directories of link are created as necessary. If there is an
- // error, it will be of type *LinkError.
+ // Parent directories of link are created as necessary.
Symlink(target, link string) error
- // Readlink returns the target path of link. If there is an error, it will
- // be of type *PathError.
+ // Readlink returns the target path of link.
Readlink(link string) (string, error)
}
@@ -107,22 +99,19 @@
// interface as an extension to the Basic interface
type Change interface {
// Chmod changes the mode of the named file to mode. If the file is a
- // symbolic link, it changes the mode of the link's target. If there is an
- // error, it will be of type *PathError.
+ // symbolic link, it changes the mode of the link's target.
Chmod(name string, mode os.FileMode) error
// Lchown changes the numeric uid and gid of the named file. If the file is
- // a symbolic link, it changes the uid and gid of the link itself. If there
- // is an error, it will be of type *PathError.
+ // a symbolic link, it changes the uid and gid of the link itself.
Lchown(name string, uid, gid int) error
// Chown changes the numeric uid and gid of the named file. If the file is a
- // symbolic link, it changes the uid and gid of the link's target. If there
- // is an error, it will be of type *PathError.
+ // symbolic link, it changes the uid and gid of the link's target.
Chown(name string, uid, gid int) error
// Chtimes changes the access and modification times of the named file,
// similar to the Unix utime() or utimes() functions.
//
// The underlying filesystem may truncate or round the values to a less
- // precise time unit. If there is an error, it will be of type *PathError.
+ // precise time unit.
Chtimes(name string, atime time.Time, mtime time.Time) error
}
diff --git a/helper/chroot/chroot.go b/helper/chroot/chroot.go
index 94cf607..e3e8bb7 100644
--- a/helper/chroot/chroot.go
+++ b/helper/chroot/chroot.go
@@ -5,7 +5,7 @@
"path/filepath"
"strings"
- "gopkg.in/src-d/go-billy.v2"
+ "gopkg.in/src-d/go-billy.v3"
)
// ChrootHelper is a helper to implement billy.Chroot.
diff --git a/helper/chroot/chroot_test.go b/helper/chroot/chroot_test.go
index e304640..27edd78 100644
--- a/helper/chroot/chroot_test.go
+++ b/helper/chroot/chroot_test.go
@@ -5,8 +5,8 @@
"path/filepath"
"testing"
- "gopkg.in/src-d/go-billy.v2"
- "gopkg.in/src-d/go-billy.v2/test"
+ "gopkg.in/src-d/go-billy.v3"
+ "gopkg.in/src-d/go-billy.v3/test"
. "gopkg.in/check.v1"
)
diff --git a/helper/mount/mount.go b/helper/mount/mount.go
index 1991c4c..74c1e88 100644
--- a/helper/mount/mount.go
+++ b/helper/mount/mount.go
@@ -8,7 +8,7 @@
"fmt"
- "gopkg.in/src-d/go-billy.v2"
+ "gopkg.in/src-d/go-billy.v3"
)
var separator = string(filepath.Separator)
diff --git a/helper/mount/mount_test.go b/helper/mount/mount_test.go
index a066e07..20af8d0 100644
--- a/helper/mount/mount_test.go
+++ b/helper/mount/mount_test.go
@@ -5,10 +5,10 @@
"path/filepath"
"testing"
- "gopkg.in/src-d/go-billy.v2"
- "gopkg.in/src-d/go-billy.v2/memfs"
- "gopkg.in/src-d/go-billy.v2/test"
- "gopkg.in/src-d/go-billy.v2/util"
+ "gopkg.in/src-d/go-billy.v3"
+ "gopkg.in/src-d/go-billy.v3/memfs"
+ "gopkg.in/src-d/go-billy.v3/test"
+ "gopkg.in/src-d/go-billy.v3/util"
. "gopkg.in/check.v1"
)
diff --git a/memfs/memory.go b/memfs/memory.go
index a28b08e..60316dd 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.v2/memfs"
+package memfs // import "gopkg.in/src-d/go-billy.v3/memfs"
import (
"errors"
@@ -10,9 +10,9 @@
"strings"
"time"
- "gopkg.in/src-d/go-billy.v2"
- "gopkg.in/src-d/go-billy.v2/helper/chroot"
- "gopkg.in/src-d/go-billy.v2/util"
+ "gopkg.in/src-d/go-billy.v3"
+ "gopkg.in/src-d/go-billy.v3/helper/chroot"
+ "gopkg.in/src-d/go-billy.v3/util"
)
const separator = filepath.Separator
diff --git a/memfs/memory_test.go b/memfs/memory_test.go
index ae3d0d2..6687459 100644
--- a/memfs/memory_test.go
+++ b/memfs/memory_test.go
@@ -3,7 +3,7 @@
import (
"testing"
- "gopkg.in/src-d/go-billy.v2/test"
+ "gopkg.in/src-d/go-billy.v3/test"
. "gopkg.in/check.v1"
)
diff --git a/osfs/os.go b/osfs/os.go
index aec35dd..62d90a5 100644
--- a/osfs/os.go
+++ b/osfs/os.go
@@ -1,13 +1,13 @@
// Package osfs provides a billy filesystem for the OS.
-package osfs // import "gopkg.in/src-d/go-billy.v2/osfs"
+package osfs // import "gopkg.in/src-d/go-billy.v3/osfs"
import (
"io/ioutil"
"os"
"path/filepath"
- "gopkg.in/src-d/go-billy.v2"
- "gopkg.in/src-d/go-billy.v2/helper/chroot"
+ "gopkg.in/src-d/go-billy.v3"
+ "gopkg.in/src-d/go-billy.v3/helper/chroot"
)
const (
diff --git a/osfs/os_test.go b/osfs/os_test.go
index fadf50b..ad3d445 100644
--- a/osfs/os_test.go
+++ b/osfs/os_test.go
@@ -7,7 +7,7 @@
"testing"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-billy.v2/test"
+ "gopkg.in/src-d/go-billy.v3/test"
)
func Test(t *testing.T) { TestingT(t) }
diff --git a/test/basic.go b/test/basic.go
index e429bcd..1a0b264 100644
--- a/test/basic.go
+++ b/test/basic.go
@@ -9,8 +9,8 @@
"path/filepath"
. "gopkg.in/check.v1"
- . "gopkg.in/src-d/go-billy.v2"
- "gopkg.in/src-d/go-billy.v2/util"
+ . "gopkg.in/src-d/go-billy.v3"
+ "gopkg.in/src-d/go-billy.v3/util"
)
// BasicSuite is a convenient test suite to validate any implementation of
diff --git a/test/chroot.go b/test/chroot.go
index e46c253..70bfac6 100644
--- a/test/chroot.go
+++ b/test/chroot.go
@@ -4,8 +4,8 @@
"os"
. "gopkg.in/check.v1"
- . "gopkg.in/src-d/go-billy.v2"
- "gopkg.in/src-d/go-billy.v2/util"
+ . "gopkg.in/src-d/go-billy.v3"
+ "gopkg.in/src-d/go-billy.v3/util"
)
// ChrootSuite is a convenient test suite to validate any implementation of
diff --git a/test/dir.go b/test/dir.go
index af65a6e..c7ca1ad 100644
--- a/test/dir.go
+++ b/test/dir.go
@@ -4,8 +4,8 @@
"os"
. "gopkg.in/check.v1"
- . "gopkg.in/src-d/go-billy.v2"
- "gopkg.in/src-d/go-billy.v2/util"
+ . "gopkg.in/src-d/go-billy.v3"
+ "gopkg.in/src-d/go-billy.v3/util"
)
// DirSuite is a convenient test suite to validate any implementation of
diff --git a/test/fs.go b/test/fs.go
index c5540d8..e135e1c 100644
--- a/test/fs.go
+++ b/test/fs.go
@@ -4,8 +4,8 @@
"os"
. "gopkg.in/check.v1"
- . "gopkg.in/src-d/go-billy.v2"
- "gopkg.in/src-d/go-billy.v2/util"
+ . "gopkg.in/src-d/go-billy.v3"
+ "gopkg.in/src-d/go-billy.v3/util"
)
// FilesystemSuite is a convenient test suite to validate any implementation of
diff --git a/test/mock.go b/test/mock.go
index 304f8d0..aaa15bc 100644
--- a/test/mock.go
+++ b/test/mock.go
@@ -6,7 +6,7 @@
"path"
"path/filepath"
- "gopkg.in/src-d/go-billy.v2"
+ "gopkg.in/src-d/go-billy.v3"
)
type BasicMock struct {
diff --git a/test/symlink.go b/test/symlink.go
index fb5f1a4..ea68736 100644
--- a/test/symlink.go
+++ b/test/symlink.go
@@ -5,8 +5,8 @@
"os"
. "gopkg.in/check.v1"
- . "gopkg.in/src-d/go-billy.v2"
- "gopkg.in/src-d/go-billy.v2/util"
+ . "gopkg.in/src-d/go-billy.v3"
+ "gopkg.in/src-d/go-billy.v3/util"
)
// SymlinkSuite is a convenient test suite to validate any implementation of
diff --git a/test/tempfile.go b/test/tempfile.go
index 1582a03..5218794 100644
--- a/test/tempfile.go
+++ b/test/tempfile.go
@@ -4,7 +4,7 @@
"strings"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-billy.v2"
+ "gopkg.in/src-d/go-billy.v3"
)
// TempFileSuite is a convenient test suite to validate any implementation of
diff --git a/util/util.go b/util/util.go
index b1c66a4..e476aa3 100644
--- a/util/util.go
+++ b/util/util.go
@@ -8,7 +8,7 @@
"sync/atomic"
"time"
- "gopkg.in/src-d/go-billy.v2"
+ "gopkg.in/src-d/go-billy.v3"
)
// RemoveAll removes path and any children it contains. It removes everything it