summaryrefslogtreecommitdiffstats
path: root/vendor/gopkg.in/src-d/go-billy.v4
diff options
context:
space:
mode:
authorMura Li <typeless@users.noreply.github.com>2019-03-27 19:15:23 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2019-03-27 19:15:23 +0800
commitd77176912bccf1dc0ad93366df55f00fee23b498 (patch)
tree309fc6350f77f4061360160b88343360d45d5d24 /vendor/gopkg.in/src-d/go-billy.v4
parentd578b71d61ee8131e8abf7f538b93d8c6cc6fe6d (diff)
downloadgitea-d77176912bccf1dc0ad93366df55f00fee23b498.tar.gz
gitea-d77176912bccf1dc0ad93366df55f00fee23b498.zip
Use Go1.11 module (#5743)
* Migrate to go modules * make vendor * Update mvdan.cc/xurls * make vendor * Update code.gitea.io/git * make fmt-check * Update github.com/go-sql-driver/mysql * make vendor
Diffstat (limited to 'vendor/gopkg.in/src-d/go-billy.v4')
-rw-r--r--vendor/gopkg.in/src-d/go-billy.v4/.gitignore5
-rw-r--r--vendor/gopkg.in/src-d/go-billy.v4/.travis.yml16
-rw-r--r--vendor/gopkg.in/src-d/go-billy.v4/DCO25
-rw-r--r--vendor/gopkg.in/src-d/go-billy.v4/MAINTAINERS1
-rw-r--r--vendor/gopkg.in/src-d/go-billy.v4/Makefile25
-rw-r--r--vendor/gopkg.in/src-d/go-billy.v4/README.md72
-rw-r--r--vendor/gopkg.in/src-d/go-billy.v4/appveyor.yml15
-rw-r--r--vendor/gopkg.in/src-d/go-billy.v4/go.mod7
-rw-r--r--vendor/gopkg.in/src-d/go-billy.v4/go.sum9
9 files changed, 175 insertions, 0 deletions
diff --git a/vendor/gopkg.in/src-d/go-billy.v4/.gitignore b/vendor/gopkg.in/src-d/go-billy.v4/.gitignore
new file mode 100644
index 0000000000..62cdb53bc4
--- /dev/null
+++ b/vendor/gopkg.in/src-d/go-billy.v4/.gitignore
@@ -0,0 +1,5 @@
+/coverage.txt
+/vendor
+Gopkg.lock
+Gopkg.toml
+go.sum
diff --git a/vendor/gopkg.in/src-d/go-billy.v4/.travis.yml b/vendor/gopkg.in/src-d/go-billy.v4/.travis.yml
new file mode 100644
index 0000000000..759e2fba82
--- /dev/null
+++ b/vendor/gopkg.in/src-d/go-billy.v4/.travis.yml
@@ -0,0 +1,16 @@
+language: go
+
+go:
+ - 1.9.x
+ - 1.10.x
+
+go_import_path: gopkg.in/src-d/go-billy.v4
+
+install:
+ - go get -v -t ./...
+
+script:
+ - make test-coverage
+
+after_success:
+ - bash <(curl -s https://codecov.io/bash)
diff --git a/vendor/gopkg.in/src-d/go-billy.v4/DCO b/vendor/gopkg.in/src-d/go-billy.v4/DCO
new file mode 100644
index 0000000000..29c1b92089
--- /dev/null
+++ b/vendor/gopkg.in/src-d/go-billy.v4/DCO
@@ -0,0 +1,25 @@
+ 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/vendor/gopkg.in/src-d/go-billy.v4/MAINTAINERS b/vendor/gopkg.in/src-d/go-billy.v4/MAINTAINERS
new file mode 100644
index 0000000000..8dbba477d8
--- /dev/null
+++ b/vendor/gopkg.in/src-d/go-billy.v4/MAINTAINERS
@@ -0,0 +1 @@
+Máximo Cuadros <mcuadros@gmail.com> (@mcuadros)
diff --git a/vendor/gopkg.in/src-d/go-billy.v4/Makefile b/vendor/gopkg.in/src-d/go-billy.v4/Makefile
new file mode 100644
index 0000000000..19e743378c
--- /dev/null
+++ b/vendor/gopkg.in/src-d/go-billy.v4/Makefile
@@ -0,0 +1,25 @@
+# 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/vendor/gopkg.in/src-d/go-billy.v4/README.md b/vendor/gopkg.in/src-d/go-billy.v4/README.md
new file mode 100644
index 0000000000..ef243cca59
--- /dev/null
+++ b/vendor/gopkg.in/src-d/go-billy.v4/README.md
@@ -0,0 +1,72 @@
+# 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.org/src-d/go-billy.svg)](https://travis-ci.org/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)
+
+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.
+
+## Installation
+
+```go
+go get -u gopkg.in/src-d/go-billy.v4/...
+```
+
+## Usage
+
+Billy exposes filesystems using the
+[`Filesystem` interface](https://godoc.org/github.com/src-d/go-billy#Filesystem).
+Each filesystem implementation gives you a `New` method, whose arguments depend on
+the implementation itself, that returns a new `Filesystem`.
+
+The following example caches in memory all readable files in a directory from any
+billy's filesystem implementation.
+
+```go
+func LoadToMemory(origin billy.Filesystem, path string) (*memory.Memory, error) {
+ memory := memory.New()
+
+ files, err := origin.ReadDir("/")
+ if err != nil {
+ return nil, err
+ }
+
+ for _, file := range files {
+ if file.IsDir() {
+ continue
+ }
+
+ src, err := origin.Open(file.Name())
+ if err != nil {
+ return nil, err
+ }
+
+ dst, err := memory.Create(file.Name())
+ if err != nil {
+ return nil, err
+ }
+
+ if _, err = io.Copy(dst, src); err != nil {
+ return nil, err
+ }
+
+ if err := dst.Close(); err != nil {
+ return nil, err
+ }
+
+ if err := src.Close(); err != nil {
+ return nil, err
+ }
+ }
+
+ return memory, nil
+}
+```
+
+## Why billy?
+
+The library billy deals with storage systems and Billy is the name of a well-known, IKEA
+bookcase. That's it.
+
+## License
+
+Apache License Version 2.0, see [LICENSE](LICENSE)
diff --git a/vendor/gopkg.in/src-d/go-billy.v4/appveyor.yml b/vendor/gopkg.in/src-d/go-billy.v4/appveyor.yml
new file mode 100644
index 0000000000..91c0b40c0e
--- /dev/null
+++ b/vendor/gopkg.in/src-d/go-billy.v4/appveyor.yml
@@ -0,0 +1,15 @@
+version: "{build}"
+platform: x64
+
+clone_folder: c:\gopath\src\gopkg.in\src-d\go-billy.v4
+
+environment:
+ GOPATH: c:\gopath
+
+install:
+ - set PATH=%GOPATH%\bin;c:\go\bin;%PATH%
+ - go version
+ - go get -v -t ./...
+
+build_script:
+ - go test -v ./...
diff --git a/vendor/gopkg.in/src-d/go-billy.v4/go.mod b/vendor/gopkg.in/src-d/go-billy.v4/go.mod
new file mode 100644
index 0000000000..eec1581118
--- /dev/null
+++ b/vendor/gopkg.in/src-d/go-billy.v4/go.mod
@@ -0,0 +1,7 @@
+module gopkg.in/src-d/go-billy.v4
+
+require (
+ github.com/kr/pretty v0.1.0 // indirect
+ golang.org/x/sys v0.0.0-20180903190138-2b024373dcd9
+ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127
+)
diff --git a/vendor/gopkg.in/src-d/go-billy.v4/go.sum b/vendor/gopkg.in/src-d/go-billy.v4/go.sum
new file mode 100644
index 0000000000..aa96620083
--- /dev/null
+++ b/vendor/gopkg.in/src-d/go-billy.v4/go.sum
@@ -0,0 +1,9 @@
+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/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-20180903190138-2b024373dcd9 h1:lkiLiLBHGoH3XnqSLUIaBsilGMUjI+Uy2Xu2JLUtTas=
+golang.org/x/sys v0.0.0-20180903190138-2b024373dcd9/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+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=