mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-06 17:49:32 +00:00
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
This commit is contained in:
5
vendor/gopkg.in/src-d/go-billy.v4/.gitignore
generated
vendored
Normal file
5
vendor/gopkg.in/src-d/go-billy.v4/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/coverage.txt
|
||||
/vendor
|
||||
Gopkg.lock
|
||||
Gopkg.toml
|
||||
go.sum
|
16
vendor/gopkg.in/src-d/go-billy.v4/.travis.yml
generated
vendored
Normal file
16
vendor/gopkg.in/src-d/go-billy.v4/.travis.yml
generated
vendored
Normal file
@@ -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)
|
25
vendor/gopkg.in/src-d/go-billy.v4/DCO
generated
vendored
Normal file
25
vendor/gopkg.in/src-d/go-billy.v4/DCO
generated
vendored
Normal file
@@ -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.
|
1
vendor/gopkg.in/src-d/go-billy.v4/MAINTAINERS
generated
vendored
Normal file
1
vendor/gopkg.in/src-d/go-billy.v4/MAINTAINERS
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Máximo Cuadros <mcuadros@gmail.com> (@mcuadros)
|
25
vendor/gopkg.in/src-d/go-billy.v4/Makefile
generated
vendored
Normal file
25
vendor/gopkg.in/src-d/go-billy.v4/Makefile
generated
vendored
Normal file
@@ -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; \
|
72
vendor/gopkg.in/src-d/go-billy.v4/README.md
generated
vendored
Normal file
72
vendor/gopkg.in/src-d/go-billy.v4/README.md
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
# go-billy [](https://godoc.org/gopkg.in/src-d/go-billy.v4) [](https://travis-ci.org/src-d/go-billy) [](https://ci.appveyor.com/project/mcuadros/go-billy) [](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)
|
15
vendor/gopkg.in/src-d/go-billy.v4/appveyor.yml
generated
vendored
Normal file
15
vendor/gopkg.in/src-d/go-billy.v4/appveyor.yml
generated
vendored
Normal file
@@ -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 ./...
|
7
vendor/gopkg.in/src-d/go-billy.v4/go.mod
generated
vendored
Normal file
7
vendor/gopkg.in/src-d/go-billy.v4/go.mod
generated
vendored
Normal file
@@ -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
|
||||
)
|
9
vendor/gopkg.in/src-d/go-billy.v4/go.sum
generated
vendored
Normal file
9
vendor/gopkg.in/src-d/go-billy.v4/go.sum
generated
vendored
Normal file
@@ -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=
|
Reference in New Issue
Block a user