mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Initial commit
This commit is contained in:
3
vendor/github.com/gobuffalo/packr/v2/.gometalinter.json
generated
vendored
Normal file
3
vendor/github.com/gobuffalo/packr/v2/.gometalinter.json
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"]
|
||||
}
|
||||
36
vendor/github.com/gobuffalo/packr/v2/.goreleaser.yml
generated
vendored
Normal file
36
vendor/github.com/gobuffalo/packr/v2/.goreleaser.yml
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
# Code generated by github.com/gobuffalo/release. DO NOT EDIT.
|
||||
# Edit .goreleaser.yml.plush instead
|
||||
|
||||
builds:
|
||||
-
|
||||
goos:
|
||||
- darwin
|
||||
- linux
|
||||
- windows
|
||||
goarch:
|
||||
- ppc64le
|
||||
- 386
|
||||
- amd64
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
ignore:
|
||||
- goos: darwin
|
||||
goarch: ppc64le
|
||||
- goos: windows
|
||||
goarch: ppc64le
|
||||
main: ./packr2/main.go
|
||||
binary: packr2
|
||||
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
|
||||
snapshot:
|
||||
name_template: "{{ .Tag }}-next"
|
||||
|
||||
changelog:
|
||||
sort: asc
|
||||
filters:
|
||||
exclude:
|
||||
- '^docs:'
|
||||
- '^test:'
|
||||
|
||||
38
vendor/github.com/gobuffalo/packr/v2/.goreleaser.yml.plush
generated
vendored
Normal file
38
vendor/github.com/gobuffalo/packr/v2/.goreleaser.yml.plush
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
builds:
|
||||
-
|
||||
goos:
|
||||
- darwin
|
||||
- linux
|
||||
- windows
|
||||
goarch:
|
||||
- ppc64le
|
||||
- 386
|
||||
- amd64
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
ignore:
|
||||
- goos: darwin
|
||||
goarch: ppc64le
|
||||
- goos: windows
|
||||
goarch: ppc64le
|
||||
main: ./packr2/main.go
|
||||
binary: packr2
|
||||
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
|
||||
snapshot:
|
||||
name_template: "{{ .Tag }}-next"
|
||||
|
||||
changelog:
|
||||
sort: asc
|
||||
filters:
|
||||
exclude:
|
||||
- '^docs:'
|
||||
- '^test:'
|
||||
<%= if (brew) { %>
|
||||
brew:
|
||||
github:
|
||||
owner: gobuffalo
|
||||
name: homebrew-tap
|
||||
<% } %>
|
||||
8
vendor/github.com/gobuffalo/packr/v2/LICENSE.txt
generated
vendored
Normal file
8
vendor/github.com/gobuffalo/packr/v2/LICENSE.txt
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
The MIT License (MIT)
|
||||
Copyright (c) 2016 Mark Bates
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
47
vendor/github.com/gobuffalo/packr/v2/Makefile
generated
vendored
Normal file
47
vendor/github.com/gobuffalo/packr/v2/Makefile
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
TAGS ?= "sqlite"
|
||||
GO_BIN ?= go
|
||||
|
||||
install: deps
|
||||
echo "installing packr v2"
|
||||
packr2
|
||||
$(GO_BIN) install -v ./packr2
|
||||
|
||||
tidy:
|
||||
ifeq ($(GO111MODULE),on)
|
||||
$(GO_BIN) mod tidy
|
||||
else
|
||||
echo skipping go mod tidy
|
||||
endif
|
||||
|
||||
deps:
|
||||
$(GO_BIN) get github.com/gobuffalo/release
|
||||
$(GO_BIN) get -tags ${TAGS} -t ./...
|
||||
$(GO_BIN) install -v ./packr2
|
||||
make tidy
|
||||
|
||||
build: deps
|
||||
packr2
|
||||
$(GO_BIN) build -v ./packr2
|
||||
make tidy
|
||||
|
||||
test:
|
||||
packr2
|
||||
$(GO_BIN) test -tags ${TAGS} ./...
|
||||
make tidy
|
||||
|
||||
lint:
|
||||
gometalinter --vendor ./... --deadline=1m --skip=internal
|
||||
|
||||
update:
|
||||
$(GO_BIN) get -u -tags ${TAGS} ./...
|
||||
make tidy
|
||||
make install
|
||||
make test
|
||||
make tidy
|
||||
|
||||
release-test:
|
||||
$(GO_BIN) test -tags ${TAGS} -race ./...
|
||||
|
||||
release:
|
||||
release -y -f version.go
|
||||
make tidy
|
||||
172
vendor/github.com/gobuffalo/packr/v2/README.md
generated
vendored
Normal file
172
vendor/github.com/gobuffalo/packr/v2/README.md
generated
vendored
Normal file
@@ -0,0 +1,172 @@
|
||||
# Packr (v2)
|
||||
|
||||
[](https://godoc.org/github.com/gobuffalo/packr/v2)
|
||||
|
||||
Packr is a simple solution for bundling static assets inside of Go binaries. Most importantly it does it in a way that is friendly to developers while they are developing.
|
||||
|
||||
## Intro Video
|
||||
|
||||
To get an idea of the what and why of Packr, please enjoy this short video: [https://vimeo.com/219863271](https://vimeo.com/219863271).
|
||||
|
||||
## Library Installation
|
||||
|
||||
```text
|
||||
$ go get -u github.com/gobuffalo/packr/v2/...
|
||||
```
|
||||
|
||||
## Binary Installation
|
||||
|
||||
```text
|
||||
$ go get -u github.com/gobuffalo/packr/v2/packr2
|
||||
```
|
||||
|
||||
## New File Format FAQs
|
||||
|
||||
In version `v2.0.0` the file format changed and is not backward compatible with the `packr-v1.x` library.
|
||||
|
||||
#### Can `packr-v1.x` read the new format?
|
||||
|
||||
No, it can not. Because of the way the new file format works porting it to `packr-v1.x` would be difficult. PR's are welcome though. :)
|
||||
|
||||
#### Can `packr-v2.x` read `packr-v1.x` files?
|
||||
|
||||
Yes it can, but that ability will eventually be phased out. Because of that we recommend moving to the new format.
|
||||
|
||||
#### Can `packr-v2.x` generate `packr-v1.x` files?
|
||||
|
||||
Yes it can, but that ability will eventually be phased out. Because of that we recommend moving to the new format.
|
||||
|
||||
The `--legacy` command is available on all commands that generate `-packr.go` files.
|
||||
|
||||
```bash
|
||||
$ packr2 --legacy
|
||||
$ packr2 install --legacy
|
||||
$ packr2 build --legacy
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### In Code
|
||||
|
||||
The first step in using Packr is to create a new box. A box represents a folder on disk. Once you have a box you can get `string` or `[]byte` representations of the file.
|
||||
|
||||
```go
|
||||
// set up a new box by giving it a name and an optional (relative) path to a folder on disk:
|
||||
box := packr.New("My Box", "./templates")
|
||||
|
||||
// Get the string representation of a file, or an error if it doesn't exist:
|
||||
html, err := box.FindString("index.html")
|
||||
|
||||
// Get the []byte representation of a file, or an error if it doesn't exist:
|
||||
html, err := box.Find("index.html")
|
||||
```
|
||||
|
||||
### What is a Box?
|
||||
|
||||
A box represents a folder, and any sub-folders, on disk that you want to have access to in your binary. When compiling a binary using the `packr2` CLI the contents of the folder will be converted into Go files that can be compiled inside of a "standard" go binary. Inside of the compiled binary the files will be read from memory. When working locally the files will be read directly off of disk. This is a seamless switch that doesn't require any special attention on your part.
|
||||
|
||||
#### Example
|
||||
|
||||
Assume the follow directory structure:
|
||||
|
||||
```
|
||||
├── main.go
|
||||
└── templates
|
||||
├── admin
|
||||
│ └── index.html
|
||||
└── index.html
|
||||
```
|
||||
|
||||
The following program will read the `./templates/admin/index.html` file and print it out.
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gobuffalo/packr/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
box := packr.New("myBox", "./templates")
|
||||
|
||||
s, err := box.FindString("admin/index.html")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
fmt.Println(s)
|
||||
}
|
||||
```
|
||||
|
||||
### Development Made Easy
|
||||
|
||||
In order to get static files into a Go binary, those files must first be converted to Go code. To do that, Packr, ships with a few tools to help build binaries. See below.
|
||||
|
||||
During development, however, it is painful to have to keep running a tool to compile those files.
|
||||
|
||||
Packr uses the following resolution rules when looking for a file:
|
||||
|
||||
1. Look for the file in-memory (inside a Go binary)
|
||||
1. Look for the file on disk (during development)
|
||||
|
||||
Because Packr knows how to fall through to the file system, developers don't need to worry about constantly compiling their static files into a binary. They can work unimpeded.
|
||||
|
||||
Packr takes file resolution a step further. When declaring a new box you use a relative path, `./templates`. When Packr recieves this call it calculates out the absolute path to that directory. By doing this it means you can be guaranteed that Packr can find your files correctly, even if you're not running in the directory that the box was created in. This helps with the problem of testing, where Go changes the `pwd` for each package, making relative paths difficult to work with. This is not a problem when using Packr.
|
||||
|
||||
---
|
||||
|
||||
## Usage with HTTP
|
||||
|
||||
A box implements the [`http.FileSystem`](https://golang.org/pkg/net/http/#FileSystemhttps://golang.org/pkg/net/http/#FileSystem) interface, meaning it can be used to serve static files.
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gobuffalo/packr/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
box := packr.New("someBoxName", "./templates")
|
||||
|
||||
http.Handle("/", http.FileServer(box))
|
||||
http.ListenAndServe(":3000", nil)
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Building a Binary (the easy way)
|
||||
|
||||
When it comes time to build, or install, your Go binary, simply use `packr2 build` or `packr2 install` just as you would `go build` or `go install`. All flags for the `go` tool are supported and everything works the way you expect, the only difference is your static assets are now bundled in the generated binary. If you want more control over how this happens, looking at the following section on building binaries (the hard way).
|
||||
|
||||
## Building a Binary (the hard way)
|
||||
|
||||
Before you build your Go binary, run the `packr2` command first. It will look for all the boxes in your code and then generate `.go` files that pack the static files into bytes that can be bundled into the Go binary.
|
||||
|
||||
```
|
||||
$ packr2
|
||||
```
|
||||
|
||||
Then run your `go build command` like normal.
|
||||
|
||||
*NOTE*: It is not recommended to check-in these generated `-packr.go` files. They can be large, and can easily become out of date if not careful. It is recommended that you always run `packr2 clean` after running the `packr2` tool.
|
||||
|
||||
#### Cleaning Up
|
||||
|
||||
When you're done it is recommended that you run the `packr2 clean` command. This will remove all of the generated files that Packr created for you.
|
||||
|
||||
```
|
||||
$ packr2 clean
|
||||
```
|
||||
|
||||
Why do you want to do this? Packr first looks to the information stored in these generated files, if the information isn't there it looks to disk. This makes it easy to work with in development.
|
||||
|
||||
---
|
||||
|
||||
## Debugging
|
||||
|
||||
The `packr2` command passes all arguments down to the underlying `go` command, this includes the `-v` flag to print out `go build` information. Packr looks for the `-v` flag, and will turn on its own verbose logging. This is very useful for trying to understand what the `packr` command is doing when it is run.
|
||||
96
vendor/github.com/gobuffalo/packr/v2/SHOULDERS.md
generated
vendored
Normal file
96
vendor/github.com/gobuffalo/packr/v2/SHOULDERS.md
generated
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
# github.com/gobuffalo/packr/v2 Stands on the Shoulders of Giants
|
||||
|
||||
github.com/gobuffalo/packr/v2 does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants this project would not be possible. Please make sure to check them out and thank them for all of their hard work.
|
||||
|
||||
Thank you to the following **GIANTS**:
|
||||
|
||||
|
||||
* [github.com/BurntSushi/toml](https://godoc.org/github.com/BurntSushi/toml)
|
||||
|
||||
* [github.com/gobuffalo/buffalo-plugins/plugins](https://godoc.org/github.com/gobuffalo/buffalo-plugins/plugins)
|
||||
|
||||
* [github.com/gobuffalo/buffalo-plugins/plugins/plugdeps](https://godoc.org/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps)
|
||||
|
||||
* [github.com/gobuffalo/envy](https://godoc.org/github.com/gobuffalo/envy)
|
||||
|
||||
* [github.com/gobuffalo/events](https://godoc.org/github.com/gobuffalo/events)
|
||||
|
||||
* [github.com/gobuffalo/flect](https://godoc.org/github.com/gobuffalo/flect)
|
||||
|
||||
* [github.com/gobuffalo/flect/name](https://godoc.org/github.com/gobuffalo/flect/name)
|
||||
|
||||
* [github.com/gobuffalo/genny](https://godoc.org/github.com/gobuffalo/genny)
|
||||
|
||||
* [github.com/gobuffalo/genny/movinglater/gotools](https://godoc.org/github.com/gobuffalo/genny/movinglater/gotools)
|
||||
|
||||
* [github.com/gobuffalo/genny/movinglater/gotools/goimports](https://godoc.org/github.com/gobuffalo/genny/movinglater/gotools/goimports)
|
||||
|
||||
* [github.com/gobuffalo/genny/movinglater/gotools/gomods](https://godoc.org/github.com/gobuffalo/genny/movinglater/gotools/gomods)
|
||||
|
||||
* [github.com/gobuffalo/logger](https://godoc.org/github.com/gobuffalo/logger)
|
||||
|
||||
* [github.com/gobuffalo/mapi](https://godoc.org/github.com/gobuffalo/mapi)
|
||||
|
||||
* [github.com/gobuffalo/meta](https://godoc.org/github.com/gobuffalo/meta)
|
||||
|
||||
* [github.com/gobuffalo/packd](https://godoc.org/github.com/gobuffalo/packd)
|
||||
|
||||
* [github.com/gobuffalo/packr/v2](https://godoc.org/github.com/gobuffalo/packr/v2)
|
||||
|
||||
* [github.com/gobuffalo/packr/v2/file](https://godoc.org/github.com/gobuffalo/packr/v2/file)
|
||||
|
||||
* [github.com/gobuffalo/packr/v2/file/resolver](https://godoc.org/github.com/gobuffalo/packr/v2/file/resolver)
|
||||
|
||||
* [github.com/gobuffalo/packr/v2/file/resolver/encoding/hex](https://godoc.org/github.com/gobuffalo/packr/v2/file/resolver/encoding/hex)
|
||||
|
||||
* [github.com/gobuffalo/packr/v2/jam/parser](https://godoc.org/github.com/gobuffalo/packr/v2/jam/parser)
|
||||
|
||||
* [github.com/gobuffalo/packr/v2/plog](https://godoc.org/github.com/gobuffalo/packr/v2/plog)
|
||||
|
||||
* [github.com/gobuffalo/syncx](https://godoc.org/github.com/gobuffalo/syncx)
|
||||
|
||||
* [github.com/joho/godotenv](https://godoc.org/github.com/joho/godotenv)
|
||||
|
||||
* [github.com/karrick/godirwalk](https://godoc.org/github.com/karrick/godirwalk)
|
||||
|
||||
* [github.com/markbates/oncer](https://godoc.org/github.com/markbates/oncer)
|
||||
|
||||
* [github.com/markbates/safe](https://godoc.org/github.com/markbates/safe)
|
||||
|
||||
* [github.com/pkg/errors](https://godoc.org/github.com/pkg/errors)
|
||||
|
||||
* [github.com/rogpeppe/go-internal/modfile](https://godoc.org/github.com/rogpeppe/go-internal/modfile)
|
||||
|
||||
* [github.com/rogpeppe/go-internal/module](https://godoc.org/github.com/rogpeppe/go-internal/module)
|
||||
|
||||
* [github.com/rogpeppe/go-internal/semver](https://godoc.org/github.com/rogpeppe/go-internal/semver)
|
||||
|
||||
* [github.com/sirupsen/logrus](https://godoc.org/github.com/sirupsen/logrus)
|
||||
|
||||
* [github.com/spf13/cobra](https://godoc.org/github.com/spf13/cobra)
|
||||
|
||||
* [github.com/spf13/pflag](https://godoc.org/github.com/spf13/pflag)
|
||||
|
||||
* [golang.org/x/crypto/ssh/terminal](https://godoc.org/golang.org/x/crypto/ssh/terminal)
|
||||
|
||||
* [golang.org/x/sys/unix](https://godoc.org/golang.org/x/sys/unix)
|
||||
|
||||
* [golang.org/x/tools/go/ast/astutil](https://godoc.org/golang.org/x/tools/go/ast/astutil)
|
||||
|
||||
* [golang.org/x/tools/go/gcexportdata](https://godoc.org/golang.org/x/tools/go/gcexportdata)
|
||||
|
||||
* [golang.org/x/tools/go/internal/cgo](https://godoc.org/golang.org/x/tools/go/internal/cgo)
|
||||
|
||||
* [golang.org/x/tools/go/internal/gcimporter](https://godoc.org/golang.org/x/tools/go/internal/gcimporter)
|
||||
|
||||
* [golang.org/x/tools/go/internal/packagesdriver](https://godoc.org/golang.org/x/tools/go/internal/packagesdriver)
|
||||
|
||||
* [golang.org/x/tools/go/packages](https://godoc.org/golang.org/x/tools/go/packages)
|
||||
|
||||
* [golang.org/x/tools/imports](https://godoc.org/golang.org/x/tools/imports)
|
||||
|
||||
* [golang.org/x/tools/internal/fastwalk](https://godoc.org/golang.org/x/tools/internal/fastwalk)
|
||||
|
||||
* [golang.org/x/tools/internal/gopathwalk](https://godoc.org/golang.org/x/tools/internal/gopathwalk)
|
||||
|
||||
* [golang.org/x/tools/internal/semver](https://godoc.org/golang.org/x/tools/internal/semver)
|
||||
263
vendor/github.com/gobuffalo/packr/v2/box.go
generated
vendored
Normal file
263
vendor/github.com/gobuffalo/packr/v2/box.go
generated
vendored
Normal file
@@ -0,0 +1,263 @@
|
||||
package packr
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/gobuffalo/envy"
|
||||
"github.com/gobuffalo/packd"
|
||||
"github.com/gobuffalo/packr/v2/file"
|
||||
"github.com/gobuffalo/packr/v2/file/resolver"
|
||||
"github.com/gobuffalo/packr/v2/plog"
|
||||
"github.com/markbates/oncer"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
var _ packd.Box = &Box{}
|
||||
var _ packd.HTTPBox = Box{}
|
||||
var _ packd.Addable = &Box{}
|
||||
var _ packd.Walkable = &Box{}
|
||||
var _ packd.Finder = Box{}
|
||||
|
||||
// NewBox returns a Box that can be used to
|
||||
// retrieve files from either disk or the embedded
|
||||
// binary.
|
||||
func NewBox(path string) *Box {
|
||||
oncer.Deprecate(0, "packr.NewBox", "Use packr.New instead.")
|
||||
return New(path, path)
|
||||
}
|
||||
|
||||
func resolutionDir(og string) string {
|
||||
ng, _ := filepath.Abs(og)
|
||||
|
||||
if resolutionDirExists(ng, og) {
|
||||
return ng
|
||||
}
|
||||
|
||||
// packr.New
|
||||
_, filename, _, _ := runtime.Caller(3)
|
||||
ng, ok := resolutionDirTestFilename(filename, og)
|
||||
if ok {
|
||||
return ng
|
||||
}
|
||||
|
||||
// packr.NewBox (deprecated)
|
||||
_, filename, _, _ = runtime.Caller(4)
|
||||
ng, ok = resolutionDirTestFilename(filename, og)
|
||||
if ok {
|
||||
return ng
|
||||
}
|
||||
|
||||
return og
|
||||
}
|
||||
|
||||
func resolutionDirExists(s, og string) bool {
|
||||
_, err := os.Stat(s)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
plog.Debug("packr", "resolutionDir", "original", og, "resolved", s)
|
||||
return true
|
||||
}
|
||||
|
||||
func resolutionDirTestFilename(filename, og string) (string, bool) {
|
||||
ng := filepath.Join(filepath.Dir(filename), og)
|
||||
|
||||
// // this little hack courtesy of the `-cover` flag!!
|
||||
cov := filepath.Join("_test", "_obj_test")
|
||||
ng = strings.Replace(ng, string(filepath.Separator)+cov, "", 1)
|
||||
|
||||
if resolutionDirExists(ng, og) {
|
||||
return ng, true
|
||||
}
|
||||
|
||||
ng = filepath.Join(envy.GoPath(), "src", ng)
|
||||
if resolutionDirExists(ng, og) {
|
||||
return ng, true
|
||||
}
|
||||
|
||||
return og, false
|
||||
}
|
||||
|
||||
func construct(name string, path string) *Box {
|
||||
return &Box{
|
||||
Path: path,
|
||||
Name: name,
|
||||
ResolutionDir: resolutionDir(path),
|
||||
resolvers: map[string]resolver.Resolver{},
|
||||
moot: &sync.RWMutex{},
|
||||
}
|
||||
}
|
||||
|
||||
func New(name string, path string) *Box {
|
||||
plog.Debug("packr", "New", "name", name, "path", path)
|
||||
b, _ := findBox(name)
|
||||
if b != nil {
|
||||
return b
|
||||
}
|
||||
|
||||
b = construct(name, path)
|
||||
plog.Debug(b, "New", "Box", b, "ResolutionDir", b.ResolutionDir)
|
||||
b, err := placeBox(b)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return b
|
||||
}
|
||||
|
||||
// Box represent a folder on a disk you want to
|
||||
// have access to in the built Go binary.
|
||||
type Box struct {
|
||||
Path string `json:"path"`
|
||||
Name string `json:"name"`
|
||||
ResolutionDir string `json:"resolution_dir"`
|
||||
DefaultResolver resolver.Resolver `json:"default_resolver"`
|
||||
resolvers map[string]resolver.Resolver
|
||||
moot *sync.RWMutex
|
||||
}
|
||||
|
||||
func (b *Box) SetResolver(file string, res resolver.Resolver) {
|
||||
b.moot.Lock()
|
||||
plog.Debug(b, "SetResolver", "file", file, "resolver", fmt.Sprintf("%T", res))
|
||||
b.resolvers[resolver.Key(file)] = res
|
||||
b.moot.Unlock()
|
||||
}
|
||||
|
||||
// AddString converts t to a byteslice and delegates to AddBytes to add to b.data
|
||||
func (b *Box) AddString(path string, t string) error {
|
||||
return b.AddBytes(path, []byte(t))
|
||||
}
|
||||
|
||||
// AddBytes sets t in b.data by the given path
|
||||
func (b *Box) AddBytes(path string, t []byte) error {
|
||||
m := map[string]file.File{}
|
||||
f, err := file.NewFile(path, t)
|
||||
if err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
m[resolver.Key(path)] = f
|
||||
res := resolver.NewInMemory(m)
|
||||
b.SetResolver(path, res)
|
||||
return nil
|
||||
}
|
||||
|
||||
// FindString returns either the string of the requested
|
||||
// file or an error if it can not be found.
|
||||
func (b Box) FindString(name string) (string, error) {
|
||||
bb, err := b.Find(name)
|
||||
return string(bb), err
|
||||
}
|
||||
|
||||
// Find returns either the byte slice of the requested
|
||||
// file or an error if it can not be found.
|
||||
func (b Box) Find(name string) ([]byte, error) {
|
||||
f, err := b.Resolve(name)
|
||||
if err != nil {
|
||||
return []byte(""), err
|
||||
}
|
||||
bb := &bytes.Buffer{}
|
||||
io.Copy(bb, f)
|
||||
return bb.Bytes(), nil
|
||||
}
|
||||
|
||||
// Has returns true if the resource exists in the box
|
||||
func (b Box) Has(name string) bool {
|
||||
_, err := b.Find(name)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// Open returns a File using the http.File interface
|
||||
func (b Box) Open(name string) (http.File, error) {
|
||||
plog.Debug(b, "Open", "name", name)
|
||||
if len(filepath.Ext(name)) == 0 {
|
||||
d, err := file.NewDir(name)
|
||||
plog.Debug(b, "Open", "name", name, "dir", d)
|
||||
return d, err
|
||||
}
|
||||
f, err := b.Resolve(name)
|
||||
if err != nil {
|
||||
return f, err
|
||||
}
|
||||
f, err = file.NewFileR(name, f)
|
||||
plog.Debug(b, "Open", "name", f.Name(), "file", f.Name())
|
||||
return f, err
|
||||
}
|
||||
|
||||
// List shows "What's in the box?"
|
||||
func (b Box) List() []string {
|
||||
var keys []string
|
||||
|
||||
b.Walk(func(path string, info File) error {
|
||||
if info == nil {
|
||||
return nil
|
||||
}
|
||||
finfo, _ := info.FileInfo()
|
||||
if !finfo.IsDir() {
|
||||
keys = append(keys, path)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
sort.Strings(keys)
|
||||
return keys
|
||||
}
|
||||
|
||||
func (b *Box) Resolve(key string) (file.File, error) {
|
||||
key = strings.TrimPrefix(key, "/")
|
||||
b.moot.RLock()
|
||||
|
||||
var r resolver.Resolver
|
||||
|
||||
for k, vr := range b.resolvers {
|
||||
lk := strings.ToLower(resolver.Key(k))
|
||||
lkey := strings.ToLower(resolver.Key(key))
|
||||
if lk == lkey {
|
||||
r = vr
|
||||
break
|
||||
}
|
||||
}
|
||||
b.moot.RUnlock()
|
||||
|
||||
if r == nil {
|
||||
r = b.DefaultResolver
|
||||
if r == nil {
|
||||
r = resolver.DefaultResolver
|
||||
if r == nil {
|
||||
return nil, errors.New("resolver.DefaultResolver is nil")
|
||||
}
|
||||
}
|
||||
}
|
||||
plog.Debug(r, "Resolve", "box", b.Name, "key", key)
|
||||
|
||||
f, err := r.Resolve(b.Name, key)
|
||||
if err != nil {
|
||||
z := filepath.Join(resolver.OsPath(b.ResolutionDir), resolver.OsPath(key))
|
||||
f, err = r.Resolve(b.Name, z)
|
||||
if err != nil {
|
||||
plog.Debug(r, "Resolve", "box", b.Name, "key", z, "err", err)
|
||||
return f, err
|
||||
}
|
||||
b, err := ioutil.ReadAll(f)
|
||||
if err != nil {
|
||||
return f, errors.WithStack(err)
|
||||
}
|
||||
f, err = file.NewFile(key, b)
|
||||
if err != nil {
|
||||
return f, errors.WithStack(err)
|
||||
}
|
||||
}
|
||||
plog.Debug(r, "Resolve", "box", b.Name, "key", key, "file", f.Name())
|
||||
return f, nil
|
||||
}
|
||||
73
vendor/github.com/gobuffalo/packr/v2/box_map.go
generated
vendored
Normal file
73
vendor/github.com/gobuffalo/packr/v2/box_map.go
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
//go:generate mapgen -name "box" -zero "nil" -go-type "*Box" -pkg "" -a "New(`test-a`, ``)" -b "New(`test-b`, ``)" -c "New(`test-c`, ``)" -bb "New(`test-bb`, ``)" -destination "packr"
|
||||
// Code generated by github.com/gobuffalo/mapgen. DO NOT EDIT.
|
||||
|
||||
package packr
|
||||
|
||||
import (
|
||||
"sort"
|
||||
"sync"
|
||||
)
|
||||
|
||||
// boxMap wraps sync.Map and uses the following types:
|
||||
// key: string
|
||||
// value: *Box
|
||||
type boxMap struct {
|
||||
data sync.Map
|
||||
}
|
||||
|
||||
// Delete the key from the map
|
||||
func (m *boxMap) Delete(key string) {
|
||||
m.data.Delete(key)
|
||||
}
|
||||
|
||||
// Load the key from the map.
|
||||
// Returns *Box or bool.
|
||||
// A false return indicates either the key was not found
|
||||
// or the value is not of type *Box
|
||||
func (m *boxMap) Load(key string) (*Box, bool) {
|
||||
i, ok := m.data.Load(key)
|
||||
if !ok {
|
||||
return nil, false
|
||||
}
|
||||
s, ok := i.(*Box)
|
||||
return s, ok
|
||||
}
|
||||
|
||||
// LoadOrStore will return an existing key or
|
||||
// store the value if not already in the map
|
||||
func (m *boxMap) LoadOrStore(key string, value *Box) (*Box, bool) {
|
||||
i, _ := m.data.LoadOrStore(key, value)
|
||||
s, ok := i.(*Box)
|
||||
return s, ok
|
||||
}
|
||||
|
||||
// Range over the *Box values in the map
|
||||
func (m *boxMap) Range(f func(key string, value *Box) bool) {
|
||||
m.data.Range(func(k, v interface{}) bool {
|
||||
key, ok := k.(string)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
value, ok := v.(*Box)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return f(key, value)
|
||||
})
|
||||
}
|
||||
|
||||
// Store a *Box in the map
|
||||
func (m *boxMap) Store(key string, value *Box) {
|
||||
m.data.Store(key, value)
|
||||
}
|
||||
|
||||
// Keys returns a list of keys in the map
|
||||
func (m *boxMap) Keys() []string {
|
||||
var keys []string
|
||||
m.Range(func(key string, value *Box) bool {
|
||||
keys = append(keys, key)
|
||||
return true
|
||||
})
|
||||
sort.Strings(keys)
|
||||
return keys
|
||||
}
|
||||
79
vendor/github.com/gobuffalo/packr/v2/deprecated.go
generated
vendored
Normal file
79
vendor/github.com/gobuffalo/packr/v2/deprecated.go
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
package packr
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
|
||||
"github.com/gobuffalo/packr/v2/file"
|
||||
"github.com/gobuffalo/packr/v2/file/resolver"
|
||||
"github.com/markbates/oncer"
|
||||
)
|
||||
|
||||
// File has been deprecated and file.File should be used instead
|
||||
type File = file.File
|
||||
|
||||
var (
|
||||
// ErrResOutsideBox gets returned in case of the requested resources being outside the box
|
||||
// Deprecated
|
||||
ErrResOutsideBox = errors.New("can't find a resource outside the box")
|
||||
)
|
||||
|
||||
// PackBytes packs bytes for a file into a box.
|
||||
// Deprecated
|
||||
func PackBytes(box string, name string, bb []byte) {
|
||||
b := NewBox(box)
|
||||
d := resolver.NewInMemory(map[string]file.File{})
|
||||
f, err := file.NewFile(name, bb)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if err := d.Pack(name, f); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
b.SetResolver(name, d)
|
||||
}
|
||||
|
||||
// PackBytesGzip packets the gzipped compressed bytes into a box.
|
||||
// Deprecated
|
||||
func PackBytesGzip(box string, name string, bb []byte) error {
|
||||
// TODO: this function never did what it was supposed to do!
|
||||
PackBytes(box, name, bb)
|
||||
return nil
|
||||
}
|
||||
|
||||
// PackJSONBytes packs JSON encoded bytes for a file into a box.
|
||||
// Deprecated
|
||||
func PackJSONBytes(box string, name string, jbb string) error {
|
||||
var bb []byte
|
||||
err := json.Unmarshal([]byte(jbb), &bb)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
PackBytes(box, name, bb)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Bytes is deprecated. Use Find instead
|
||||
func (b Box) Bytes(name string) []byte {
|
||||
bb, _ := b.Find(name)
|
||||
oncer.Deprecate(0, "github.com/gobuffalo/packr/v2#Box.Bytes", "Use github.com/gobuffalo/packr/v2#Box.Find instead.")
|
||||
return bb
|
||||
}
|
||||
|
||||
// MustBytes is deprecated. Use Find instead.
|
||||
func (b Box) MustBytes(name string) ([]byte, error) {
|
||||
oncer.Deprecate(0, "github.com/gobuffalo/packr/v2#Box.MustBytes", "Use github.com/gobuffalo/packr/v2#Box.Find instead.")
|
||||
return b.Find(name)
|
||||
}
|
||||
|
||||
// String is deprecated. Use FindString instead
|
||||
func (b Box) String(name string) string {
|
||||
oncer.Deprecate(0, "github.com/gobuffalo/packr/v2#Box.String", "Use github.com/gobuffalo/packr/v2#Box.FindString instead.")
|
||||
return string(b.Bytes(name))
|
||||
}
|
||||
|
||||
// MustString is deprecated. Use FindString instead
|
||||
func (b Box) MustString(name string) (string, error) {
|
||||
oncer.Deprecate(0, "github.com/gobuffalo/packr/v2#Box.MustString", "Use github.com/gobuffalo/packr/v2#Box.FindString instead.")
|
||||
return b.FindString(name)
|
||||
}
|
||||
32
vendor/github.com/gobuffalo/packr/v2/file/file.go
generated
vendored
Normal file
32
vendor/github.com/gobuffalo/packr/v2/file/file.go
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
package file
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
|
||||
"github.com/gobuffalo/packd"
|
||||
)
|
||||
|
||||
// File represents a virtual, or physical, backing of
|
||||
// a file object in a Box
|
||||
type File = packd.File
|
||||
|
||||
// FileMappable types are capable of returning a map of
|
||||
// path => File
|
||||
type FileMappable interface {
|
||||
FileMap() map[string]File
|
||||
}
|
||||
|
||||
// NewFile returns a virtual File implementation
|
||||
func NewFile(name string, b []byte) (File, error) {
|
||||
return packd.NewFile(name, bytes.NewReader(b))
|
||||
}
|
||||
|
||||
// NewDir returns a virtual dir implementation
|
||||
func NewDir(name string) (File, error) {
|
||||
return packd.NewDir(name)
|
||||
}
|
||||
|
||||
func NewFileR(name string, r io.Reader) (File, error) {
|
||||
return packd.NewFile(name, r)
|
||||
}
|
||||
38
vendor/github.com/gobuffalo/packr/v2/file/info.go
generated
vendored
Normal file
38
vendor/github.com/gobuffalo/packr/v2/file/info.go
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
package file
|
||||
|
||||
import (
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
|
||||
type info struct {
|
||||
Path string
|
||||
Contents []byte
|
||||
size int64
|
||||
modTime time.Time
|
||||
isDir bool
|
||||
}
|
||||
|
||||
func (f info) Name() string {
|
||||
return f.Path
|
||||
}
|
||||
|
||||
func (f info) Size() int64 {
|
||||
return f.size
|
||||
}
|
||||
|
||||
func (f info) Mode() os.FileMode {
|
||||
return 0444
|
||||
}
|
||||
|
||||
func (f info) ModTime() time.Time {
|
||||
return f.modTime
|
||||
}
|
||||
|
||||
func (f info) IsDir() bool {
|
||||
return f.isDir
|
||||
}
|
||||
|
||||
func (f info) Sys() interface{} {
|
||||
return nil
|
||||
}
|
||||
81
vendor/github.com/gobuffalo/packr/v2/file/resolver/disk.go
generated
vendored
Normal file
81
vendor/github.com/gobuffalo/packr/v2/file/resolver/disk.go
generated
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
package resolver
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/gobuffalo/packr/v2/file"
|
||||
"github.com/gobuffalo/packr/v2/plog"
|
||||
"github.com/karrick/godirwalk"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
var _ Resolver = &Disk{}
|
||||
|
||||
type Disk struct {
|
||||
Root string
|
||||
}
|
||||
|
||||
func (d Disk) String() string {
|
||||
return String(&d)
|
||||
}
|
||||
|
||||
func (d *Disk) Resolve(box string, name string) (file.File, error) {
|
||||
path := OsPath(name)
|
||||
if !filepath.IsAbs(path) {
|
||||
path = filepath.Join(OsPath(d.Root), path)
|
||||
}
|
||||
fi, err := os.Stat(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if fi.IsDir() {
|
||||
return file.NewDir(OsPath(name))
|
||||
}
|
||||
if bb, err := ioutil.ReadFile(path); err == nil {
|
||||
return file.NewFile(OsPath(name), bb)
|
||||
}
|
||||
return nil, os.ErrNotExist
|
||||
}
|
||||
|
||||
var _ file.FileMappable = &Disk{}
|
||||
|
||||
func (d *Disk) FileMap() map[string]file.File {
|
||||
moot := &sync.Mutex{}
|
||||
m := map[string]file.File{}
|
||||
root := OsPath(d.Root)
|
||||
if _, err := os.Stat(root); err != nil {
|
||||
return m
|
||||
}
|
||||
callback := func(path string, de *godirwalk.Dirent) error {
|
||||
if _, err := os.Stat(root); err != nil {
|
||||
return nil
|
||||
}
|
||||
if !de.IsRegular() {
|
||||
return nil
|
||||
}
|
||||
moot.Lock()
|
||||
name := strings.TrimPrefix(path, root+string(filepath.Separator))
|
||||
b, err := ioutil.ReadFile(path)
|
||||
if err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
m[name], err = file.NewFile(name, b)
|
||||
if err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
moot.Unlock()
|
||||
return nil
|
||||
}
|
||||
err := godirwalk.Walk(root, &godirwalk.Options{
|
||||
FollowSymbolicLinks: true,
|
||||
Callback: callback,
|
||||
})
|
||||
if err != nil {
|
||||
plog.Logger.Errorf("[%s] error walking %v", root, err)
|
||||
}
|
||||
return m
|
||||
}
|
||||
315
vendor/github.com/gobuffalo/packr/v2/file/resolver/encoding/hex/hex.go
generated
vendored
Normal file
315
vendor/github.com/gobuffalo/packr/v2/file/resolver/encoding/hex/hex.go
generated
vendored
Normal file
@@ -0,0 +1,315 @@
|
||||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Package hex implements hexadecimal encoding and decoding.
|
||||
package hex
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
)
|
||||
|
||||
const hextable = "0123456789abcdef"
|
||||
|
||||
// EncodedLen returns the length of an encoding of n source bytes.
|
||||
// Specifically, it returns n * 2.
|
||||
func EncodedLen(n int) int { return n * 2 }
|
||||
|
||||
// Encode encodes src into EncodedLen(len(src))
|
||||
// bytes of dst. As a convenience, it returns the number
|
||||
// of bytes written to dst, but this value is always EncodedLen(len(src)).
|
||||
// Encode implements hexadecimal encoding.
|
||||
func Encode(dst, src []byte) int {
|
||||
for i, v := range src {
|
||||
dst[i*2] = hextable[v>>4]
|
||||
dst[i*2+1] = hextable[v&0x0f]
|
||||
}
|
||||
|
||||
return len(src) * 2
|
||||
}
|
||||
|
||||
// ErrLength reports an attempt to decode an odd-length input
|
||||
// using Decode or DecodeString.
|
||||
// The stream-based Decoder returns io.ErrUnexpectedEOF instead of ErrLength.
|
||||
var ErrLength = errors.New("encoding/hex: odd length hex string")
|
||||
|
||||
// InvalidByteError values describe errors resulting from an invalid byte in a hex string.
|
||||
type InvalidByteError byte
|
||||
|
||||
func (e InvalidByteError) Error() string {
|
||||
return fmt.Sprintf("encoding/hex: invalid byte: %#U", rune(e))
|
||||
}
|
||||
|
||||
// DecodedLen returns the length of a decoding of x source bytes.
|
||||
// Specifically, it returns x / 2.
|
||||
func DecodedLen(x int) int { return x / 2 }
|
||||
|
||||
// Decode decodes src into DecodedLen(len(src)) bytes,
|
||||
// returning the actual number of bytes written to dst.
|
||||
//
|
||||
// Decode expects that src contains only hexadecimal
|
||||
// characters and that src has even length.
|
||||
// If the input is malformed, Decode returns the number
|
||||
// of bytes decoded before the error.
|
||||
func Decode(dst, src []byte) (int, error) {
|
||||
var i int
|
||||
for i = 0; i < len(src)/2; i++ {
|
||||
a, ok := fromHexChar(src[i*2])
|
||||
if !ok {
|
||||
return i, InvalidByteError(src[i*2])
|
||||
}
|
||||
b, ok := fromHexChar(src[i*2+1])
|
||||
if !ok {
|
||||
return i, InvalidByteError(src[i*2+1])
|
||||
}
|
||||
dst[i] = (a << 4) | b
|
||||
}
|
||||
if len(src)%2 == 1 {
|
||||
// Check for invalid char before reporting bad length,
|
||||
// since the invalid char (if present) is an earlier problem.
|
||||
if _, ok := fromHexChar(src[i*2]); !ok {
|
||||
return i, InvalidByteError(src[i*2])
|
||||
}
|
||||
return i, ErrLength
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
||||
// fromHexChar converts a hex character into its value and a success flag.
|
||||
func fromHexChar(c byte) (byte, bool) {
|
||||
switch {
|
||||
case '0' <= c && c <= '9':
|
||||
return c - '0', true
|
||||
case 'a' <= c && c <= 'f':
|
||||
return c - 'a' + 10, true
|
||||
case 'A' <= c && c <= 'F':
|
||||
return c - 'A' + 10, true
|
||||
}
|
||||
|
||||
return 0, false
|
||||
}
|
||||
|
||||
// EncodeToString returns the hexadecimal encoding of src.
|
||||
func EncodeToString(src []byte) string {
|
||||
dst := make([]byte, EncodedLen(len(src)))
|
||||
Encode(dst, src)
|
||||
return string(dst)
|
||||
}
|
||||
|
||||
// DecodeString returns the bytes represented by the hexadecimal string s.
|
||||
//
|
||||
// DecodeString expects that src contains only hexadecimal
|
||||
// characters and that src has even length.
|
||||
// If the input is malformed, DecodeString returns
|
||||
// the bytes decoded before the error.
|
||||
func DecodeString(s string) ([]byte, error) {
|
||||
src := []byte(s)
|
||||
// We can use the source slice itself as the destination
|
||||
// because the decode loop increments by one and then the 'seen' byte is not used anymore.
|
||||
n, err := Decode(src, src)
|
||||
return src[:n], err
|
||||
}
|
||||
|
||||
// Dump returns a string that contains a hex dump of the given data. The format
|
||||
// of the hex dump matches the output of `hexdump -C` on the command line.
|
||||
func Dump(data []byte) string {
|
||||
var buf bytes.Buffer
|
||||
dumper := Dumper(&buf)
|
||||
dumper.Write(data)
|
||||
dumper.Close()
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
// bufferSize is the number of hexadecimal characters to buffer in encoder and decoder.
|
||||
const bufferSize = 1024
|
||||
|
||||
type encoder struct {
|
||||
w io.Writer
|
||||
err error
|
||||
out [bufferSize]byte // output buffer
|
||||
}
|
||||
|
||||
// NewEncoder returns an io.Writer that writes lowercase hexadecimal characters to w.
|
||||
func NewEncoder(w io.Writer) io.Writer {
|
||||
return &encoder{w: w}
|
||||
}
|
||||
|
||||
func (e *encoder) Write(p []byte) (n int, err error) {
|
||||
for len(p) > 0 && e.err == nil {
|
||||
chunkSize := bufferSize / 2
|
||||
if len(p) < chunkSize {
|
||||
chunkSize = len(p)
|
||||
}
|
||||
|
||||
var written int
|
||||
encoded := Encode(e.out[:], p[:chunkSize])
|
||||
written, e.err = e.w.Write(e.out[:encoded])
|
||||
n += written / 2
|
||||
p = p[chunkSize:]
|
||||
}
|
||||
return n, e.err
|
||||
}
|
||||
|
||||
type decoder struct {
|
||||
r io.Reader
|
||||
err error
|
||||
in []byte // input buffer (encoded form)
|
||||
arr [bufferSize]byte // backing array for in
|
||||
}
|
||||
|
||||
// NewDecoder returns an io.Reader that decodes hexadecimal characters from r.
|
||||
// NewDecoder expects that r contain only an even number of hexadecimal characters.
|
||||
func NewDecoder(r io.Reader) io.Reader {
|
||||
return &decoder{r: r}
|
||||
}
|
||||
|
||||
func (d *decoder) Read(p []byte) (n int, err error) {
|
||||
// Fill internal buffer with sufficient bytes to decode
|
||||
if len(d.in) < 2 && d.err == nil {
|
||||
var numCopy, numRead int
|
||||
numCopy = copy(d.arr[:], d.in) // Copies either 0 or 1 bytes
|
||||
numRead, d.err = d.r.Read(d.arr[numCopy:])
|
||||
d.in = d.arr[:numCopy+numRead]
|
||||
if d.err == io.EOF && len(d.in)%2 != 0 {
|
||||
if _, ok := fromHexChar(d.in[len(d.in)-1]); !ok {
|
||||
d.err = InvalidByteError(d.in[len(d.in)-1])
|
||||
} else {
|
||||
d.err = io.ErrUnexpectedEOF
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Decode internal buffer into output buffer
|
||||
if numAvail := len(d.in) / 2; len(p) > numAvail {
|
||||
p = p[:numAvail]
|
||||
}
|
||||
numDec, err := Decode(p, d.in[:len(p)*2])
|
||||
d.in = d.in[2*numDec:]
|
||||
if err != nil {
|
||||
d.in, d.err = nil, err // Decode error; discard input remainder
|
||||
}
|
||||
|
||||
if len(d.in) < 2 {
|
||||
return numDec, d.err // Only expose errors when buffer fully consumed
|
||||
}
|
||||
return numDec, nil
|
||||
}
|
||||
|
||||
// Dumper returns a WriteCloser that writes a hex dump of all written data to
|
||||
// w. The format of the dump matches the output of `hexdump -C` on the command
|
||||
// line.
|
||||
func Dumper(w io.Writer) io.WriteCloser {
|
||||
return &dumper{w: w}
|
||||
}
|
||||
|
||||
type dumper struct {
|
||||
w io.Writer
|
||||
rightChars [18]byte
|
||||
buf [14]byte
|
||||
used int // number of bytes in the current line
|
||||
n uint // number of bytes, total
|
||||
closed bool
|
||||
}
|
||||
|
||||
func toChar(b byte) byte {
|
||||
if b < 32 || b > 126 {
|
||||
return '.'
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (h *dumper) Write(data []byte) (n int, err error) {
|
||||
if h.closed {
|
||||
return 0, errors.New("encoding/hex: dumper closed")
|
||||
}
|
||||
|
||||
// Output lines look like:
|
||||
// 00000010 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d |./0123456789:;<=|
|
||||
// ^ offset ^ extra space ^ ASCII of line.
|
||||
for i := range data {
|
||||
if h.used == 0 {
|
||||
// At the beginning of a line we print the current
|
||||
// offset in hex.
|
||||
h.buf[0] = byte(h.n >> 24)
|
||||
h.buf[1] = byte(h.n >> 16)
|
||||
h.buf[2] = byte(h.n >> 8)
|
||||
h.buf[3] = byte(h.n)
|
||||
Encode(h.buf[4:], h.buf[:4])
|
||||
h.buf[12] = ' '
|
||||
h.buf[13] = ' '
|
||||
_, err = h.w.Write(h.buf[4:])
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
Encode(h.buf[:], data[i:i+1])
|
||||
h.buf[2] = ' '
|
||||
l := 3
|
||||
if h.used == 7 {
|
||||
// There's an additional space after the 8th byte.
|
||||
h.buf[3] = ' '
|
||||
l = 4
|
||||
} else if h.used == 15 {
|
||||
// At the end of the line there's an extra space and
|
||||
// the bar for the right column.
|
||||
h.buf[3] = ' '
|
||||
h.buf[4] = '|'
|
||||
l = 5
|
||||
}
|
||||
_, err = h.w.Write(h.buf[:l])
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
n++
|
||||
h.rightChars[h.used] = toChar(data[i])
|
||||
h.used++
|
||||
h.n++
|
||||
if h.used == 16 {
|
||||
h.rightChars[16] = '|'
|
||||
h.rightChars[17] = '\n'
|
||||
_, err = h.w.Write(h.rightChars[:])
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
h.used = 0
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (h *dumper) Close() (err error) {
|
||||
// See the comments in Write() for the details of this format.
|
||||
if h.closed {
|
||||
return
|
||||
}
|
||||
h.closed = true
|
||||
if h.used == 0 {
|
||||
return
|
||||
}
|
||||
h.buf[0] = ' '
|
||||
h.buf[1] = ' '
|
||||
h.buf[2] = ' '
|
||||
h.buf[3] = ' '
|
||||
h.buf[4] = '|'
|
||||
nBytes := h.used
|
||||
for h.used < 16 {
|
||||
l := 3
|
||||
if h.used == 7 {
|
||||
l = 4
|
||||
} else if h.used == 15 {
|
||||
l = 5
|
||||
}
|
||||
_, err = h.w.Write(h.buf[:l])
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
h.used++
|
||||
}
|
||||
h.rightChars[nBytes] = '|'
|
||||
h.rightChars[nBytes+1] = '\n'
|
||||
_, err = h.w.Write(h.rightChars[:nBytes+2])
|
||||
return
|
||||
}
|
||||
113
vendor/github.com/gobuffalo/packr/v2/file/resolver/hex_gzip.go
generated
vendored
Normal file
113
vendor/github.com/gobuffalo/packr/v2/file/resolver/hex_gzip.go
generated
vendored
Normal file
@@ -0,0 +1,113 @@
|
||||
package resolver
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"compress/gzip"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/gobuffalo/packr/v2/file/resolver/encoding/hex"
|
||||
"github.com/gobuffalo/packr/v2/plog"
|
||||
|
||||
"github.com/gobuffalo/packr/v2/file"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
var _ Resolver = &HexGzip{}
|
||||
|
||||
type HexGzip struct {
|
||||
packed map[string]string
|
||||
unpacked map[string]string
|
||||
moot *sync.RWMutex
|
||||
}
|
||||
|
||||
func (hg HexGzip) String() string {
|
||||
return String(&hg)
|
||||
}
|
||||
|
||||
var _ file.FileMappable = &HexGzip{}
|
||||
|
||||
func (hg *HexGzip) FileMap() map[string]file.File {
|
||||
hg.moot.RLock()
|
||||
var names []string
|
||||
for k := range hg.packed {
|
||||
names = append(names, k)
|
||||
}
|
||||
hg.moot.RUnlock()
|
||||
m := map[string]file.File{}
|
||||
for _, n := range names {
|
||||
if f, err := hg.Resolve("", n); err == nil {
|
||||
m[n] = f
|
||||
}
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
func (hg *HexGzip) Resolve(box string, name string) (file.File, error) {
|
||||
plog.Debug(hg, "Resolve", "box", box, "name", name)
|
||||
hg.moot.Lock()
|
||||
defer hg.moot.Unlock()
|
||||
|
||||
if s, ok := hg.unpacked[name]; ok {
|
||||
return file.NewFile(name, []byte(s))
|
||||
}
|
||||
packed, ok := hg.packed[name]
|
||||
if !ok {
|
||||
return nil, os.ErrNotExist
|
||||
}
|
||||
|
||||
unpacked, err := UnHexGzipString(packed)
|
||||
if err != nil {
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
|
||||
f, err := file.NewFile(OsPath(name), []byte(unpacked))
|
||||
if err != nil {
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
hg.unpacked[name] = f.String()
|
||||
return f, nil
|
||||
}
|
||||
|
||||
func NewHexGzip(files map[string]string) (*HexGzip, error) {
|
||||
if files == nil {
|
||||
files = map[string]string{}
|
||||
}
|
||||
|
||||
hg := &HexGzip{
|
||||
packed: files,
|
||||
unpacked: map[string]string{},
|
||||
moot: &sync.RWMutex{},
|
||||
}
|
||||
|
||||
return hg, nil
|
||||
}
|
||||
|
||||
func HexGzipString(s string) (string, error) {
|
||||
bb := &bytes.Buffer{}
|
||||
enc := hex.NewEncoder(bb)
|
||||
zw := gzip.NewWriter(enc)
|
||||
io.Copy(zw, strings.NewReader(s))
|
||||
zw.Close()
|
||||
|
||||
return bb.String(), nil
|
||||
}
|
||||
|
||||
func UnHexGzipString(packed string) (string, error) {
|
||||
br := bytes.NewBufferString(packed)
|
||||
dec := hex.NewDecoder(br)
|
||||
zr, err := gzip.NewReader(dec)
|
||||
if err != nil {
|
||||
return "", errors.WithStack(err)
|
||||
}
|
||||
defer zr.Close()
|
||||
|
||||
b, err := ioutil.ReadAll(zr)
|
||||
if err != nil {
|
||||
return "", errors.WithStack(err)
|
||||
}
|
||||
return string(b), nil
|
||||
}
|
||||
21
vendor/github.com/gobuffalo/packr/v2/file/resolver/ident.go
generated
vendored
Normal file
21
vendor/github.com/gobuffalo/packr/v2/file/resolver/ident.go
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
package resolver
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func Key(s string) string {
|
||||
s = strings.Replace(s, "\\", "/", -1)
|
||||
return s
|
||||
}
|
||||
|
||||
func OsPath(s string) string {
|
||||
if runtime.GOOS == "windows" {
|
||||
s = strings.Replace(s, "/", string(filepath.Separator), -1)
|
||||
} else {
|
||||
s = strings.Replace(s, "\\", string(filepath.Separator), -1)
|
||||
}
|
||||
return s
|
||||
}
|
||||
64
vendor/github.com/gobuffalo/packr/v2/file/resolver/in_memory.go
generated
vendored
Normal file
64
vendor/github.com/gobuffalo/packr/v2/file/resolver/in_memory.go
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
package resolver
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
|
||||
"github.com/gobuffalo/packd"
|
||||
"github.com/gobuffalo/packr/v2/file"
|
||||
"github.com/gobuffalo/packr/v2/plog"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
var _ Resolver = &InMemory{}
|
||||
|
||||
type InMemory struct {
|
||||
*packd.MemoryBox
|
||||
}
|
||||
|
||||
func (d InMemory) String() string {
|
||||
return String(&d)
|
||||
}
|
||||
|
||||
func (d *InMemory) Resolve(box string, name string) (file.File, error) {
|
||||
b, err := d.MemoryBox.Find(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return file.NewFile(name, b)
|
||||
}
|
||||
|
||||
func (d *InMemory) Pack(name string, f file.File) error {
|
||||
plog.Debug(d, "Pack", "name", name)
|
||||
b, err := ioutil.ReadAll(f)
|
||||
if err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
d.AddBytes(name, b)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *InMemory) FileMap() map[string]file.File {
|
||||
m := map[string]file.File{}
|
||||
d.Walk(func(path string, file file.File) error {
|
||||
m[path] = file
|
||||
return nil
|
||||
})
|
||||
return m
|
||||
}
|
||||
|
||||
func NewInMemory(files map[string]file.File) *InMemory {
|
||||
if files == nil {
|
||||
files = map[string]file.File{}
|
||||
}
|
||||
box := packd.NewMemoryBox()
|
||||
|
||||
for p, f := range files {
|
||||
if b, err := ioutil.ReadAll(f); err == nil {
|
||||
box.AddBytes(p, b)
|
||||
}
|
||||
}
|
||||
|
||||
return &InMemory{
|
||||
MemoryBox: box,
|
||||
}
|
||||
}
|
||||
7
vendor/github.com/gobuffalo/packr/v2/file/resolver/packable.go
generated
vendored
Normal file
7
vendor/github.com/gobuffalo/packr/v2/file/resolver/packable.go
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
package resolver
|
||||
|
||||
import "github.com/gobuffalo/packr/v2/file"
|
||||
|
||||
type Packable interface {
|
||||
Pack(name string, f file.File) error
|
||||
}
|
||||
33
vendor/github.com/gobuffalo/packr/v2/file/resolver/resolver.go
generated
vendored
Normal file
33
vendor/github.com/gobuffalo/packr/v2/file/resolver/resolver.go
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
package resolver
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/gobuffalo/packr/v2/file"
|
||||
)
|
||||
|
||||
type Resolver interface {
|
||||
Resolve(string, string) (file.File, error)
|
||||
}
|
||||
|
||||
func defaultResolver() Resolver {
|
||||
pwd, _ := os.Getwd()
|
||||
return &Disk{
|
||||
Root: pwd,
|
||||
}
|
||||
}
|
||||
|
||||
var DefaultResolver = defaultResolver()
|
||||
|
||||
func String(r Resolver) string {
|
||||
m := map[string]interface{}{
|
||||
"name": fmt.Sprintf("%T", r),
|
||||
}
|
||||
if fm, ok := r.(file.FileMappable); ok {
|
||||
m["files"] = fm
|
||||
}
|
||||
b, _ := json.Marshal(m)
|
||||
return string(b)
|
||||
}
|
||||
23
vendor/github.com/gobuffalo/packr/v2/go.mod
generated
vendored
Normal file
23
vendor/github.com/gobuffalo/packr/v2/go.mod
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
module github.com/gobuffalo/packr/v2
|
||||
|
||||
require (
|
||||
github.com/gobuffalo/buffalo-plugins v1.11.0 // indirect
|
||||
github.com/gobuffalo/envy v1.6.12
|
||||
github.com/gobuffalo/genny v0.0.0-20190112155932-f31a84fcacf5
|
||||
github.com/gobuffalo/logger v0.0.0-20181127160119-5b956e21995c
|
||||
github.com/gobuffalo/meta v0.0.0-20190120163247-50bbb1fa260d // indirect
|
||||
github.com/gobuffalo/packd v0.0.0-20181212173646-eca3b8fd6687
|
||||
github.com/karrick/godirwalk v1.7.8
|
||||
github.com/kr/pty v1.1.3 // indirect
|
||||
github.com/markbates/deplist v1.0.5 // indirect
|
||||
github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2
|
||||
github.com/markbates/safe v1.0.1
|
||||
github.com/pkg/errors v0.8.1
|
||||
github.com/rogpeppe/go-internal v1.1.0
|
||||
github.com/sirupsen/logrus v1.3.0
|
||||
github.com/spf13/cobra v0.0.3
|
||||
github.com/stretchr/testify v1.3.0
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4
|
||||
golang.org/x/sys v0.0.0-20190116161447-11f53e031339 // indirect
|
||||
golang.org/x/tools v0.0.0-20190118193359-16909d206f00
|
||||
)
|
||||
400
vendor/github.com/gobuffalo/packr/v2/go.sum
generated
vendored
Normal file
400
vendor/github.com/gobuffalo/packr/v2/go.sum
generated
vendored
Normal file
@@ -0,0 +1,400 @@
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
|
||||
github.com/ajg/form v0.0.0-20160822230020-523a5da1a92f/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
|
||||
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
|
||||
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
|
||||
github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk=
|
||||
github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0=
|
||||
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
|
||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dustin/go-humanize v0.0.0-20180713052910-9f541cc9db5d/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fatih/structs v1.0.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
|
||||
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
||||
github.com/gobuffalo/buffalo v0.12.8-0.20181004233540-fac9bb505aa8/go.mod h1:sLyT7/dceRXJUxSsE813JTQtA3Eb1vjxWfo/N//vXIY=
|
||||
github.com/gobuffalo/buffalo v0.13.0/go.mod h1:Mjn1Ba9wpIbpbrD+lIDMy99pQ0H0LiddMIIDGse7qT4=
|
||||
github.com/gobuffalo/buffalo-plugins v1.0.2/go.mod h1:pOp/uF7X3IShFHyobahTkTLZaeUXwb0GrUTb9ngJWTs=
|
||||
github.com/gobuffalo/buffalo-plugins v1.0.4/go.mod h1:pWS1vjtQ6uD17MVFWf7i3zfThrEKWlI5+PYLw/NaDB4=
|
||||
github.com/gobuffalo/buffalo-plugins v1.4.3/go.mod h1:uCzTY0woez4nDMdQjkcOYKanngeUVRO2HZi7ezmAjWY=
|
||||
github.com/gobuffalo/buffalo-plugins v1.5.1/go.mod h1:jbmwSZK5+PiAP9cC09VQOrGMZFCa/P0UMlIS3O12r5w=
|
||||
github.com/gobuffalo/buffalo-plugins v1.6.4/go.mod h1:/+N1aophkA2jZ1ifB2O3Y9yGwu6gKOVMtUmJnbg+OZI=
|
||||
github.com/gobuffalo/buffalo-plugins v1.6.5/go.mod h1:0HVkbgrVs/MnPZ/FOseDMVanCTm2RNcdM0PuXcL1NNI=
|
||||
github.com/gobuffalo/buffalo-plugins v1.6.7/go.mod h1:ZGZRkzz2PiKWHs0z7QsPBOTo2EpcGRArMEym6ghKYgk=
|
||||
github.com/gobuffalo/buffalo-plugins v1.6.9/go.mod h1:yYlYTrPdMCz+6/+UaXg5Jm4gN3xhsvsQ2ygVatZV5vw=
|
||||
github.com/gobuffalo/buffalo-plugins v1.6.11/go.mod h1:eAA6xJIL8OuynJZ8amXjRmHND6YiusVAaJdHDN1Lu8Q=
|
||||
github.com/gobuffalo/buffalo-plugins v1.8.2/go.mod h1:9te6/VjEQ7pKp7lXlDIMqzxgGpjlKoAcAANdCgoR960=
|
||||
github.com/gobuffalo/buffalo-plugins v1.8.3/go.mod h1:IAWq6vjZJVXebIq2qGTLOdlXzmpyTZ5iJG5b59fza5U=
|
||||
github.com/gobuffalo/buffalo-plugins v1.9.4/go.mod h1:grCV6DGsQlVzQwk6XdgcL3ZPgLm9BVxlBmXPMF8oBHI=
|
||||
github.com/gobuffalo/buffalo-plugins v1.10.0 h1:oF+BJ20zenp31xJnjkFcXAMUqlrMMTicsD/UwQWCW/s=
|
||||
github.com/gobuffalo/buffalo-plugins v1.10.0/go.mod h1:4osg8d9s60txLuGwXnqH+RCjPHj9K466cDFRl3PErHI=
|
||||
github.com/gobuffalo/buffalo-plugins v1.11.0 h1:yZ6USaSdAKpogRS8DZJgeG7/CTPGmyhplwifphmmegw=
|
||||
github.com/gobuffalo/buffalo-plugins v1.11.0/go.mod h1:rtIvAYRjYibgmWhnjKmo7OadtnxuMG5ZQLr25ozAzjg=
|
||||
github.com/gobuffalo/buffalo-pop v1.0.5/go.mod h1:Fw/LfFDnSmB/vvQXPvcXEjzP98Tc+AudyNWUBWKCwQ8=
|
||||
github.com/gobuffalo/envy v1.6.4/go.mod h1:Abh+Jfw475/NWtYMEt+hnJWRiC8INKWibIMyNt1w2Mc=
|
||||
github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ=
|
||||
github.com/gobuffalo/envy v1.6.6/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ=
|
||||
github.com/gobuffalo/envy v1.6.7/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ=
|
||||
github.com/gobuffalo/envy v1.6.8/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ=
|
||||
github.com/gobuffalo/envy v1.6.9/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ=
|
||||
github.com/gobuffalo/envy v1.6.10/go.mod h1:X0CFllQjTV5ogsnUrg+Oks2yTI+PU2dGYBJOEI2D1Uo=
|
||||
github.com/gobuffalo/envy v1.6.11/go.mod h1:Fiq52W7nrHGDggFPhn2ZCcHw4u/rqXkqo+i7FB6EAcg=
|
||||
github.com/gobuffalo/envy v1.6.12 h1:zkhss8DXz/pty2HAyA8BnvWMTYxo4gjd4+WCnYovoxY=
|
||||
github.com/gobuffalo/envy v1.6.12/go.mod h1:qJNrJhKkZpEW0glh5xP2syQHH5kgdmgsKss2Kk8PTP0=
|
||||
github.com/gobuffalo/events v1.0.3/go.mod h1:Txo8WmqScapa7zimEQIwgiJBvMECMe9gJjsKNPN3uZw=
|
||||
github.com/gobuffalo/events v1.0.7/go.mod h1:z8txf6H9jWhQ5Scr7YPLWg/cgXBRj8Q4uYI+rsVCCSQ=
|
||||
github.com/gobuffalo/events v1.0.8/go.mod h1:A5KyqT1sA+3GJiBE4QKZibse9mtOcI9nw8gGrDdqYGs=
|
||||
github.com/gobuffalo/events v1.1.3/go.mod h1:9yPGWYv11GENtzrIRApwQRMYSbUgCsZ1w6R503fCfrk=
|
||||
github.com/gobuffalo/events v1.1.4/go.mod h1:09/YRRgZHEOts5Isov+g9X2xajxdvOAcUuAHIX/O//A=
|
||||
github.com/gobuffalo/events v1.1.5/go.mod h1:3YUSzgHfYctSjEjLCWbkXP6djH2M+MLaVRzb4ymbAK0=
|
||||
github.com/gobuffalo/events v1.1.7/go.mod h1:6fGqxH2ing5XMb3EYRq9LEkVlyPGs4oO/eLzh+S8CxY=
|
||||
github.com/gobuffalo/events v1.1.8/go.mod h1:UFy+W6X6VbCWS8k2iT81HYX65dMtiuVycMy04cplt/8=
|
||||
github.com/gobuffalo/events v1.1.9 h1:ukq5ys/h0TuiX7eLJyZBD1dJOy0r19JTEYmgXKG9j+Y=
|
||||
github.com/gobuffalo/events v1.1.9/go.mod h1:/0nf8lMtP5TkgNbzYxR6Bl4GzBy5s5TebgNTdRfRbPM=
|
||||
github.com/gobuffalo/fizz v1.0.12/go.mod h1:C0sltPxpYK8Ftvf64kbsQa2yiCZY4RZviurNxXdAKwc=
|
||||
github.com/gobuffalo/flect v0.0.0-20180907193754-dc14d8acaf9f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA=
|
||||
github.com/gobuffalo/flect v0.0.0-20181002182613-4571df4b1daf/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA=
|
||||
github.com/gobuffalo/flect v0.0.0-20181007231023-ae7ed6bfe683/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA=
|
||||
github.com/gobuffalo/flect v0.0.0-20181018182602-fd24a256709f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA=
|
||||
github.com/gobuffalo/flect v0.0.0-20181019110701-3d6f0b585514/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA=
|
||||
github.com/gobuffalo/flect v0.0.0-20181024204909-8f6be1a8c6c2/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA=
|
||||
github.com/gobuffalo/flect v0.0.0-20181104133451-1f6e9779237a/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA=
|
||||
github.com/gobuffalo/flect v0.0.0-20181114183036-47375f6d8328/go.mod h1:0HvNbHdfh+WOvDSIASqJOSxTOWSxCCUF++k/Y53v9rI=
|
||||
github.com/gobuffalo/flect v0.0.0-20181210151238-24a2b68e0316/go.mod h1:en58vff74S9b99Eg42Dr+/9yPu437QjlNsO/hBYPuOk=
|
||||
github.com/gobuffalo/flect v0.0.0-20190104192022-4af577e09bf2 h1:51NF9n6h4nGMooU5ALB+uJCM0UOmcWjAegIZb/ePtoE=
|
||||
github.com/gobuffalo/flect v0.0.0-20190104192022-4af577e09bf2/go.mod h1:en58vff74S9b99Eg42Dr+/9yPu437QjlNsO/hBYPuOk=
|
||||
github.com/gobuffalo/flect v0.0.0-20190117212819-a62e61d96794 h1:HZOs07hF3AmoaUj4HJQHV5RqfOuGnPZI7aFcireIrww=
|
||||
github.com/gobuffalo/flect v0.0.0-20190117212819-a62e61d96794/go.mod h1:397QT6v05LkZkn07oJXXT6y9FCfwC8Pug0WA2/2mE9k=
|
||||
github.com/gobuffalo/genny v0.0.0-20180924032338-7af3a40f2252/go.mod h1:tUTQOogrr7tAQnhajMSH6rv1BVev34H2sa1xNHMy94g=
|
||||
github.com/gobuffalo/genny v0.0.0-20181003150629-3786a0744c5d/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM=
|
||||
github.com/gobuffalo/genny v0.0.0-20181005145118-318a41a134cc/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM=
|
||||
github.com/gobuffalo/genny v0.0.0-20181007153042-b8de7d566757/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA=
|
||||
github.com/gobuffalo/genny v0.0.0-20181012161047-33e5f43d83a6/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA=
|
||||
github.com/gobuffalo/genny v0.0.0-20181017160347-90a774534246/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA=
|
||||
github.com/gobuffalo/genny v0.0.0-20181024195656-51392254bf53/go.mod h1:o9GEH5gn5sCKLVB5rHFC4tq40rQ3VRUzmx6WwmaqISE=
|
||||
github.com/gobuffalo/genny v0.0.0-20181025145300-af3f81d526b8/go.mod h1:uZ1fFYvdcP8mu0B/Ynarf6dsGvp7QFIpk/QACUuFUVI=
|
||||
github.com/gobuffalo/genny v0.0.0-20181027191429-94d6cfb5c7fc/go.mod h1:x7SkrQQBx204Y+O9EwRXeszLJDTaWN0GnEasxgLrQTA=
|
||||
github.com/gobuffalo/genny v0.0.0-20181027195209-3887b7171c4f/go.mod h1:JbKx8HSWICu5zyqWOa0dVV1pbbXOHusrSzQUprW6g+w=
|
||||
github.com/gobuffalo/genny v0.0.0-20181106193839-7dcb0924caf1/go.mod h1:x61yHxvbDCgQ/7cOAbJCacZQuHgB0KMSzoYcw5debjU=
|
||||
github.com/gobuffalo/genny v0.0.0-20181107223128-f18346459dbe/go.mod h1:utQD3aKKEsdb03oR+Vi/6ztQb1j7pO10N3OBoowRcSU=
|
||||
github.com/gobuffalo/genny v0.0.0-20181114215459-0a4decd77f5d/go.mod h1:kN2KZ8VgXF9VIIOj/GM0Eo7YK+un4Q3tTreKOf0q1ng=
|
||||
github.com/gobuffalo/genny v0.0.0-20181119162812-e8ff4adce8bb/go.mod h1:BA9htSe4bZwBDJLe8CUkoqkypq3hn3+CkoHqVOW718E=
|
||||
github.com/gobuffalo/genny v0.0.0-20181127225641-2d959acc795b/go.mod h1:l54xLXNkteX/PdZ+HlgPk1qtcrgeOr3XUBBPDbH+7CQ=
|
||||
github.com/gobuffalo/genny v0.0.0-20181128191930-77e34f71ba2a/go.mod h1:FW/D9p7cEEOqxYA71/hnrkOWm62JZ5ZNxcNIVJEaWBU=
|
||||
github.com/gobuffalo/genny v0.0.0-20181203165245-fda8bcce96b1/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM=
|
||||
github.com/gobuffalo/genny v0.0.0-20181203201232-849d2c9534ea/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM=
|
||||
github.com/gobuffalo/genny v0.0.0-20181206121324-d6fb8a0dbe36/go.mod h1:wpNSANu9UErftfiaAlz1pDZclrYzLtO5lALifODyjuM=
|
||||
github.com/gobuffalo/genny v0.0.0-20181207164119-84844398a37d/go.mod h1:y0ysCHGGQf2T3vOhCrGHheYN54Y/REj0ayd0Suf4C/8=
|
||||
github.com/gobuffalo/genny v0.0.0-20181211165820-e26c8466f14d/go.mod h1:sHnK+ZSU4e2feXP3PA29ouij6PUEiN+RCwECjCTB3yM=
|
||||
github.com/gobuffalo/genny v0.0.0-20190104222617-a71664fc38e7/go.mod h1:QPsQ1FnhEsiU8f+O0qKWXz2RE4TiDqLVChWkBuh1WaY=
|
||||
github.com/gobuffalo/genny v0.0.0-20190112155932-f31a84fcacf5 h1:boQS3dA9PxhyufJEWIILrG6pJQbDnpwP2rFyvWacdoY=
|
||||
github.com/gobuffalo/genny v0.0.0-20190112155932-f31a84fcacf5/go.mod h1:CIaHCrSIuJ4il6ka3Hub4DR4adDrGoXGEEt2FbBxoIo=
|
||||
github.com/gobuffalo/github_flavored_markdown v1.0.4/go.mod h1:uRowCdK+q8d/RF0Kt3/DSalaIXbb0De/dmTqMQdkQ4I=
|
||||
github.com/gobuffalo/github_flavored_markdown v1.0.5/go.mod h1:U0643QShPF+OF2tJvYNiYDLDGDuQmJZXsf/bHOJPsMY=
|
||||
github.com/gobuffalo/github_flavored_markdown v1.0.7/go.mod h1:w93Pd9Lz6LvyQXEG6DktTPHkOtCbr+arAD5mkwMzXLI=
|
||||
github.com/gobuffalo/httptest v1.0.2/go.mod h1:7T1IbSrg60ankme0aDLVnEY0h056g9M1/ZvpVThtB7E=
|
||||
github.com/gobuffalo/licenser v0.0.0-20180924033006-eae28e638a42/go.mod h1:Ubo90Np8gpsSZqNScZZkVXXAo5DGhTb+WYFIjlnog8w=
|
||||
github.com/gobuffalo/licenser v0.0.0-20181025145548-437d89de4f75/go.mod h1:x3lEpYxkRG/XtGCUNkio+6RZ/dlOvLzTI9M1auIwFcw=
|
||||
github.com/gobuffalo/licenser v0.0.0-20181027200154-58051a75da95/go.mod h1:BzhaaxGd1tq1+OLKObzgdCV9kqVhbTulxOpYbvMQWS0=
|
||||
github.com/gobuffalo/licenser v0.0.0-20181109171355-91a2a7aac9a7/go.mod h1:m+Ygox92pi9bdg+gVaycvqE8RVSjZp7mWw75+K5NPHk=
|
||||
github.com/gobuffalo/licenser v0.0.0-20181128165715-cc7305f8abed/go.mod h1:oU9F9UCE+AzI/MueCKZamsezGOOHfSirltllOVeRTAE=
|
||||
github.com/gobuffalo/licenser v0.0.0-20181203160806-fe900bbede07/go.mod h1:ph6VDNvOzt1CdfaWC+9XwcBnlSTBz2j49PBwum6RFaU=
|
||||
github.com/gobuffalo/licenser v0.0.0-20181211173111-f8a311c51159/go.mod h1:ve/Ue99DRuvnTaLq2zKa6F4KtHiYf7W046tDjuGYPfM=
|
||||
github.com/gobuffalo/logger v0.0.0-20181022175615-46cfb361fc27/go.mod h1:8sQkgyhWipz1mIctHF4jTxmJh1Vxhp7mP8IqbljgJZo=
|
||||
github.com/gobuffalo/logger v0.0.0-20181027144941-73d08d2bb969/go.mod h1:7uGg2duHKpWnN4+YmyKBdLXfhopkAdVM6H3nKbyFbz8=
|
||||
github.com/gobuffalo/logger v0.0.0-20181027193913-9cf4dd0efe46/go.mod h1:7uGg2duHKpWnN4+YmyKBdLXfhopkAdVM6H3nKbyFbz8=
|
||||
github.com/gobuffalo/logger v0.0.0-20181109185836-3feeab578c17/go.mod h1:oNErH0xLe+utO+OW8ptXMSA5DkiSEDW1u3zGIt8F9Ew=
|
||||
github.com/gobuffalo/logger v0.0.0-20181117211126-8e9b89b7c264/go.mod h1:5etB91IE0uBlw9k756fVKZJdS+7M7ejVhmpXXiSFj0I=
|
||||
github.com/gobuffalo/logger v0.0.0-20181127160119-5b956e21995c/go.mod h1:+HxKANrR9VGw9yN3aOAppJKvhO05ctDi63w4mDnKv2U=
|
||||
github.com/gobuffalo/makr v1.1.5/go.mod h1:Y+o0btAH1kYAMDJW/TX3+oAXEu0bmSLLoC9mIFxtzOw=
|
||||
github.com/gobuffalo/mapi v1.0.0/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc=
|
||||
github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc=
|
||||
github.com/gobuffalo/meta v0.0.0-20181018155829-df62557efcd3/go.mod h1:XTTOhwMNryif3x9LkTTBO/Llrveezd71u3quLd0u7CM=
|
||||
github.com/gobuffalo/meta v0.0.0-20181018192820-8c6cef77dab3/go.mod h1:E94EPzx9NERGCY69UWlcj6Hipf2uK/vnfrF4QD0plVE=
|
||||
github.com/gobuffalo/meta v0.0.0-20181025145500-3a985a084b0a/go.mod h1:YDAKBud2FP7NZdruCSlmTmDOZbVSa6bpK7LJ/A/nlKg=
|
||||
github.com/gobuffalo/meta v0.0.0-20181114191255-b130ebedd2f7/go.mod h1:K6cRZ29ozr4Btvsqkjvg5nDFTLOgTqf03KA70Ks0ypE=
|
||||
github.com/gobuffalo/meta v0.0.0-20181127070345-0d7e59dd540b/go.mod h1:RLO7tMvE0IAKAM8wny1aN12pvEKn7EtkBLkUZR00Qf8=
|
||||
github.com/gobuffalo/meta v0.0.0-20190120163247-50bbb1fa260d h1:cP3lJDiGboBok8q6axF0rqWjlg/MOCfgjuwuNp5TlhE=
|
||||
github.com/gobuffalo/meta v0.0.0-20190120163247-50bbb1fa260d/go.mod h1:KKsH44nIK2gA8p0PJmRT9GvWJUdphkDUA8AJEvFWiqM=
|
||||
github.com/gobuffalo/mw-basicauth v1.0.3/go.mod h1:dg7+ilMZOKnQFHDefUzUHufNyTswVUviCBgF244C1+0=
|
||||
github.com/gobuffalo/mw-contenttype v0.0.0-20180802152300-74f5a47f4d56/go.mod h1:7EvcmzBbeCvFtQm5GqF9ys6QnCxz2UM1x0moiWLq1No=
|
||||
github.com/gobuffalo/mw-csrf v0.0.0-20180802151833-446ff26e108b/go.mod h1:sbGtb8DmDZuDUQoxjr8hG1ZbLtZboD9xsn6p77ppcHo=
|
||||
github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130/go.mod h1:JvNHRj7bYNAMUr/5XMkZaDcw3jZhUZpsmzhd//FFWmQ=
|
||||
github.com/gobuffalo/mw-i18n v0.0.0-20180802152014-e3060b7e13d6/go.mod h1:91AQfukc52A6hdfIfkxzyr+kpVYDodgAeT5cjX1UIj4=
|
||||
github.com/gobuffalo/mw-paramlogger v0.0.0-20181005191442-d6ee392ec72e/go.mod h1:6OJr6VwSzgJMqWMj7TYmRUqzNe2LXu/W1rRW4MAz/ME=
|
||||
github.com/gobuffalo/mw-tokenauth v0.0.0-20181001105134-8545f626c189/go.mod h1:UqBF00IfKvd39ni5+yI5MLMjAf4gX7cDKN/26zDOD6c=
|
||||
github.com/gobuffalo/packd v0.0.0-20181027182251-01ad393492c8/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc=
|
||||
github.com/gobuffalo/packd v0.0.0-20181027190505-aafc0d02c411/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc=
|
||||
github.com/gobuffalo/packd v0.0.0-20181027194105-7ae579e6d213/go.mod h1:SmdBdhj6uhOsg1Ui4SFAyrhuc7U4VCildosO5IDJ3lc=
|
||||
github.com/gobuffalo/packd v0.0.0-20181031195726-c82734870264/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI=
|
||||
github.com/gobuffalo/packd v0.0.0-20181104210303-d376b15f8e96/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI=
|
||||
github.com/gobuffalo/packd v0.0.0-20181111195323-b2e760a5f0ff/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI=
|
||||
github.com/gobuffalo/packd v0.0.0-20181114190715-f25c5d2471d7/go.mod h1:Yf2toFaISlyQrr5TfO3h6DB9pl9mZRmyvBGQb/aQ/pI=
|
||||
github.com/gobuffalo/packd v0.0.0-20181124090624-311c6248e5fb/go.mod h1:Foenia9ZvITEvG05ab6XpiD5EfBHPL8A6hush8SJ0o8=
|
||||
github.com/gobuffalo/packd v0.0.0-20181207120301-c49825f8f6f4/go.mod h1:LYc0TGKFBBFTRC9dg2pcRcMqGCTMD7T2BIMP7OBuQAA=
|
||||
github.com/gobuffalo/packd v0.0.0-20181212173646-eca3b8fd6687 h1:uZ+G4JprR0UEq0aHZs+6eP7TEZuFfrIkmQWejIBV/QQ=
|
||||
github.com/gobuffalo/packd v0.0.0-20181212173646-eca3b8fd6687/go.mod h1:LYc0TGKFBBFTRC9dg2pcRcMqGCTMD7T2BIMP7OBuQAA=
|
||||
github.com/gobuffalo/packr v1.13.7/go.mod h1:KkinLIn/n6+3tVXMwg6KkNvWwVsrRAz4ph+jgpk3Z24=
|
||||
github.com/gobuffalo/packr v1.15.0/go.mod h1:t5gXzEhIviQwVlNx/+3SfS07GS+cZ2hn76WLzPp6MGI=
|
||||
github.com/gobuffalo/packr v1.15.1/go.mod h1:IeqicJ7jm8182yrVmNbM6PR4g79SjN9tZLH8KduZZwE=
|
||||
github.com/gobuffalo/packr v1.19.0/go.mod h1:MstrNkfCQhd5o+Ct4IJ0skWlxN8emOq8DsoT1G98VIU=
|
||||
github.com/gobuffalo/packr v1.20.0/go.mod h1:JDytk1t2gP+my1ig7iI4NcVaXr886+N0ecUga6884zw=
|
||||
github.com/gobuffalo/packr v1.21.0/go.mod h1:H00jGfj1qFKxscFJSw8wcL4hpQtPe1PfU2wa6sg/SR0=
|
||||
github.com/gobuffalo/packr/v2 v2.0.0-rc.8/go.mod h1:y60QCdzwuMwO2R49fdQhsjCPv7tLQFR0ayzxxla9zes=
|
||||
github.com/gobuffalo/packr/v2 v2.0.0-rc.9/go.mod h1:fQqADRfZpEsgkc7c/K7aMew3n4aF1Kji7+lIZeR98Fc=
|
||||
github.com/gobuffalo/packr/v2 v2.0.0-rc.10/go.mod h1:4CWWn4I5T3v4c1OsJ55HbHlUEKNWMITG5iIkdr4Px4w=
|
||||
github.com/gobuffalo/packr/v2 v2.0.0-rc.11/go.mod h1:JoieH/3h3U4UmatmV93QmqyPUdf4wVM9HELaHEu+3fk=
|
||||
github.com/gobuffalo/packr/v2 v2.0.0-rc.12/go.mod h1:FV1zZTsVFi1DSCboO36Xgs4pzCZBjB/tDV9Cz/lSaR8=
|
||||
github.com/gobuffalo/packr/v2 v2.0.0-rc.13/go.mod h1:2Mp7GhBFMdJlOK8vGfl7SYtfMP3+5roE39ejlfjw0rA=
|
||||
github.com/gobuffalo/packr/v2 v2.0.0-rc.14/go.mod h1:06otbrNvDKO1eNQ3b8hst+1010UooI2MFg+B2Ze4MV8=
|
||||
github.com/gobuffalo/plush v3.7.16+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI=
|
||||
github.com/gobuffalo/plush v3.7.20+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI=
|
||||
github.com/gobuffalo/plush v3.7.21+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI=
|
||||
github.com/gobuffalo/plush v3.7.22+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI=
|
||||
github.com/gobuffalo/plush v3.7.23+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI=
|
||||
github.com/gobuffalo/plush v3.7.30+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI=
|
||||
github.com/gobuffalo/plush v3.7.31+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI=
|
||||
github.com/gobuffalo/plush v3.7.32+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI=
|
||||
github.com/gobuffalo/plushgen v0.0.0-20181128164830-d29dcb966cb2/go.mod h1:r9QwptTFnuvSaSRjpSp4S2/4e2D3tJhARYbvEBcKSb4=
|
||||
github.com/gobuffalo/plushgen v0.0.0-20181203163832-9fc4964505c2/go.mod h1:opEdT33AA2HdrIwK1aibqnTJDVVKXC02Bar/GT1YRVs=
|
||||
github.com/gobuffalo/plushgen v0.0.0-20181207152837-eedb135bd51b/go.mod h1:Lcw7HQbEVm09sAQrCLzIxuhFbB3nAgp4c55E+UlynR0=
|
||||
github.com/gobuffalo/plushgen v0.0.0-20190104222512-177cd2b872b3 h1:y+xgpBg0jHuTTDOE65FahfUgugBDpOp4C0RXXtGiSB0=
|
||||
github.com/gobuffalo/plushgen v0.0.0-20190104222512-177cd2b872b3/go.mod h1:tYxCozi8X62bpZyKXYHw1ncx2ZtT2nFvG42kuLwYjoc=
|
||||
github.com/gobuffalo/pop v4.8.2+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg=
|
||||
github.com/gobuffalo/pop v4.8.3+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg=
|
||||
github.com/gobuffalo/pop v4.8.4+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg=
|
||||
github.com/gobuffalo/release v1.0.35/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4=
|
||||
github.com/gobuffalo/release v1.0.38/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4=
|
||||
github.com/gobuffalo/release v1.0.42/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug=
|
||||
github.com/gobuffalo/release v1.0.52/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug=
|
||||
github.com/gobuffalo/release v1.0.53/go.mod h1:FdF257nd8rqhNaqtDWFGhxdJ/Ig4J7VcS3KL7n/a+aA=
|
||||
github.com/gobuffalo/release v1.0.54/go.mod h1:Pe5/RxRa/BE8whDpGfRqSI7D1a0evGK1T4JDm339tJc=
|
||||
github.com/gobuffalo/release v1.0.61/go.mod h1:mfIO38ujUNVDlBziIYqXquYfBF+8FDHUjKZgYC1Hj24=
|
||||
github.com/gobuffalo/release v1.0.72/go.mod h1:NP5NXgg/IX3M5XmHmWR99D687/3Dt9qZtTK/Lbwc1hU=
|
||||
github.com/gobuffalo/release v1.1.1/go.mod h1:Sluak1Xd6kcp6snkluR1jeXAogdJZpFFRzTYRs/2uwg=
|
||||
github.com/gobuffalo/release v1.1.3/go.mod h1:CuXc5/m+4zuq8idoDt1l4va0AXAn/OSs08uHOfMVr8E=
|
||||
github.com/gobuffalo/release v1.1.6 h1:haad/N5NdoEKK4bmaHLuMeuZdNYIJyXmv+TA8ZwFYwo=
|
||||
github.com/gobuffalo/release v1.1.6/go.mod h1:18naWa3kBsqO0cItXZNJuefCKOENpbbUIqRL1g+p6z0=
|
||||
github.com/gobuffalo/shoulders v1.0.1/go.mod h1:V33CcVmaQ4gRUmHKwq1fiTXuf8Gp/qjQBUL5tHPmvbA=
|
||||
github.com/gobuffalo/syncx v0.0.0-20181120191700-98333ab04150/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw=
|
||||
github.com/gobuffalo/syncx v0.0.0-20181120194010-558ac7de985f/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw=
|
||||
github.com/gobuffalo/tags v2.0.11+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY=
|
||||
github.com/gobuffalo/tags v2.0.14+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY=
|
||||
github.com/gobuffalo/tags v2.0.15+incompatible h1:qc5hMXPsXD+zYPSlNgqzlpVW7z/+GJEVCqn245BEUIY=
|
||||
github.com/gobuffalo/tags v2.0.15+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY=
|
||||
github.com/gobuffalo/uuid v2.0.3+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE=
|
||||
github.com/gobuffalo/uuid v2.0.4+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE=
|
||||
github.com/gobuffalo/uuid v2.0.5+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE=
|
||||
github.com/gobuffalo/validate v2.0.3+incompatible/go.mod h1:N+EtDe0J8252BgfzQUChBgfd6L93m9weay53EWFVsMM=
|
||||
github.com/gobuffalo/x v0.0.0-20181003152136-452098b06085/go.mod h1:WevpGD+5YOreDJznWevcn8NTmQEW5STSBgIkpkjzqXc=
|
||||
github.com/gobuffalo/x v0.0.0-20181007152206-913e47c59ca7/go.mod h1:9rDPXaB3kXdKWzMc4odGQQdG2e2DIEmANy5aSJ9yesY=
|
||||
github.com/gofrs/uuid v3.1.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||
github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE=
|
||||
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||
github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
|
||||
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||
github.com/gorilla/pat v0.0.0-20180118222023-199c85a7f6d1/go.mod h1:YeAe0gNeiNT5hoiZRI4yiOky6jVdNvfO2N6Kav/HmxY=
|
||||
github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
|
||||
github.com/gorilla/sessions v1.1.2/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w=
|
||||
github.com/gorilla/sessions v1.1.3/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ=
|
||||
github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I=
|
||||
github.com/jmoiron/sqlx v0.0.0-20180614180643-0dae4fefe7c0/go.mod h1:IiEW3SEiiErVyFdH8NTuWjSifiEQKUoyK3LNqr2kCHU=
|
||||
github.com/joho/godotenv v1.2.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
|
||||
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
|
||||
github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34=
|
||||
github.com/karrick/godirwalk v1.7.7/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34=
|
||||
github.com/karrick/godirwalk v1.7.8 h1:VfG72pyIxgtC7+3X9CMHI0AOl4LwyRAg98WAgsvffi8=
|
||||
github.com/karrick/godirwalk v1.7.8/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34=
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
|
||||
github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
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/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
github.com/markbates/deplist v1.0.4/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM=
|
||||
github.com/markbates/deplist v1.0.5/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM=
|
||||
github.com/markbates/going v1.0.2/go.mod h1:UWCk3zm0UKefHZ7l8BNqi26UyiEMniznk8naLdTcy6c=
|
||||
github.com/markbates/grift v1.0.4/go.mod h1:wbmtW74veyx+cgfwFhlnnMWqhoz55rnHR47oMXzsyVs=
|
||||
github.com/markbates/hmax v1.0.0/go.mod h1:cOkR9dktiESxIMu+65oc/r/bdY4bE8zZw3OLhLx0X2c=
|
||||
github.com/markbates/inflect v1.0.0/go.mod h1:oTeZL2KHA7CUX6X+fovmK9OvIOFuqu0TwdQrZjLTh88=
|
||||
github.com/markbates/inflect v1.0.1/go.mod h1:uv3UVNBe5qBIfCm8O8Q+DW+S1EopeyINj+Ikhc7rnCk=
|
||||
github.com/markbates/inflect v1.0.3/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs=
|
||||
github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs=
|
||||
github.com/markbates/oncer v0.0.0-20180924031910-e862a676800b/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
|
||||
github.com/markbates/oncer v0.0.0-20180924034138-723ad0170a46/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
|
||||
github.com/markbates/oncer v0.0.0-20181014194634-05fccaae8fc4/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
|
||||
github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
|
||||
github.com/markbates/refresh v1.4.10/go.mod h1:NDPHvotuZmTmesXxr95C9bjlw1/0frJwtME2dzcVKhc=
|
||||
github.com/markbates/safe v1.0.0/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=
|
||||
github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=
|
||||
github.com/markbates/sigtx v1.0.0/go.mod h1:QF1Hv6Ic6Ca6W+T+DL0Y/ypborFKyvUY9HmuCD4VeTc=
|
||||
github.com/markbates/willie v1.0.9/go.mod h1:fsrFVWl91+gXpx/6dv715j7i11fYPfZ9ZGfH0DQzY7w=
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
|
||||
github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4=
|
||||
github.com/microcosm-cc/bluemonday v1.0.2 h1:5lPfLTTAvAbtS0VqT+94yOtFnGfUWYyx0+iToC3Os3s=
|
||||
github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc=
|
||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/monoculum/formam v0.0.0-20180901015400-4e68be1d79ba/go.mod h1:RKgILGEJq24YyJ2ban8EO0RUVSJlF1pGsEvoLEACr/Q=
|
||||
github.com/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2xBGjv0j365Q=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
||||
github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rogpeppe/go-internal v1.0.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.1.0 h1:g0fH8RicVgNl+zVZDCDfbdWxAWoAEJyI7I3TZYXFiig=
|
||||
github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs=
|
||||
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
|
||||
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
|
||||
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
|
||||
github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ=
|
||||
github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU=
|
||||
github.com/shurcooL/highlight_go v0.0.0-20170515013102-78fb10f4a5f8/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag=
|
||||
github.com/shurcooL/octicon v0.0.0-20180602230221-c42b0e3b24d9/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ=
|
||||
github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
||||
github.com/sirupsen/logrus v1.1.0/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A=
|
||||
github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sirupsen/logrus v1.3.0 h1:hI/7Q+DtNZ2kINb6qt/lS+IyXnHQe9e90POfeewL/ME=
|
||||
github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE=
|
||||
github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA=
|
||||
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
||||
github.com/spf13/afero v1.2.0/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
|
||||
github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg=
|
||||
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
|
||||
github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/viper v1.2.1/go.mod h1:P4AexN0a+C9tGAnUFNwDMYYZv3pjFuvmeiMyKRaNVlI=
|
||||
github.com/spf13/viper v1.3.1/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
|
||||
github.com/unrolled/secure v0.0.0-20180918153822-f340ee86eb8b/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA=
|
||||
github.com/unrolled/secure v0.0.0-20181005190816-ff9db2ff917f/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA=
|
||||
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181024171144-74cb1d3d52f4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181025113841-85e1b3f9139a/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181025213731-e84da0312774/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181106171534-e4dc69e5b2fd/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190102171810-8d7daa0c54b3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc h1:F5tKCVGp+MUAHhKp5MZtGqAlGX3+oCsiL1Q629FL90M=
|
||||
golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180816102801-aaf60122140d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180921000356-2f5d2388922f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180926154720-4dfa2610cdf3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181017193950-04a2e542c03f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181102091132-c10e9556a7bc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181207154023-610586996380/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3 h1:eH6Eip3UpmR+yM/qI9Ijluzb1bNv/cAU/n+6l8tRSis=
|
||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180921163948-d47a0f339242/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180927150500-dad3d9fb7b6e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181005133103-4497e2df6f9e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181011152604-fa43e7bc11ba/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181022134430-8a28ead16f52/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181024145615-5cd93ef61a7c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181025063200-d989b31c8746/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181026064943-731415f00dce/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181106135930-3a76605856fd/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181206074257-70b957f3b65e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190102155601-82a175fd1598 h1:S8GOgffXV1X3fpVG442QRfWOt0iFl79eHJ7OPt725bo=
|
||||
golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190116161447-11f53e031339 h1:g/Jesu8+QLnA0CPzF3E1pURg0Byr7i6jLoX5sqjcAh0=
|
||||
golang.org/x/sys v0.0.0-20190116161447-11f53e031339/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181003024731-2f84ea8ef872/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181006002542-f60d9635b16a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181008205924-a2b3f7f249e9/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181013182035-5e66757b835f/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181017214349-06f26fdaaa28/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181024171208-a2dc47679d30/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181026183834-f60e5f99f081/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181105230042-78dc5bac0cac/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181107215632-34b416bd17b3/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181114190951-94339b83286c/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181119130350-139d099f6620/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181127195227-b4e97c0ed882/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181127232545-e782529d0ddd/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181203210056-e5f3ab76ea4b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181205224935-3576414c54a4/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181206194817-bcd4e47d0288/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181207183836-8bc39b988060/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181212172921-837e80568c09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190102213336-ca9055ed7d04/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190104182027-498d95493402/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190111214448-fc1d57b08d7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190118193359-16909d206f00 h1:6OmoTtlNJlHuWNIjTEyUtMBHrryp8NRuf/XtnC7MmXM=
|
||||
golang.org/x/tools v0.0.0-20190118193359-16909d206f00/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
|
||||
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw=
|
||||
gopkg.in/mail.v2 v2.0.0-20180731213649-a0242b2233b4/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
53
vendor/github.com/gobuffalo/packr/v2/jam/parser/args.go
generated
vendored
Normal file
53
vendor/github.com/gobuffalo/packr/v2/jam/parser/args.go
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
package parser
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// FromArgs is useful when writing packr store-cmd binaries.
|
||||
/*
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/gobuffalo/packr/v2/jam/parser"
|
||||
"github.com/markbates/s3packr/s3packr"
|
||||
)
|
||||
|
||||
func main() {
|
||||
err := parser.FromArgs(os.Args[1:], func(boxes parser.Boxes) error {
|
||||
for _, box := range boxes {
|
||||
s3 := s3packr.New(box)
|
||||
if err := s3.Pack(box); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
*/
|
||||
func FromArgs(args []string, fn func(Boxes) error) error {
|
||||
if len(args) == 0 {
|
||||
return errors.New("you must supply a payload")
|
||||
}
|
||||
payload := args[0]
|
||||
if len(payload) == 0 {
|
||||
return errors.New("you must supply a payload")
|
||||
}
|
||||
|
||||
var boxes Boxes
|
||||
err := json.Unmarshal([]byte(payload), &boxes)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return fn(boxes)
|
||||
}
|
||||
40
vendor/github.com/gobuffalo/packr/v2/jam/parser/box.go
generated
vendored
Normal file
40
vendor/github.com/gobuffalo/packr/v2/jam/parser/box.go
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
package parser
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Box found while parsing a file
|
||||
type Box struct {
|
||||
Name string // name of the box
|
||||
Path string // relative path of folder NewBox("./templates")
|
||||
AbsPath string // absolute path of Path
|
||||
Package string // the package name the box was found in
|
||||
PWD string // the PWD when the parser was run
|
||||
PackageDir string // the absolute path of the package where the box was found
|
||||
}
|
||||
|
||||
type Boxes []*Box
|
||||
|
||||
// String - json returned
|
||||
func (b Box) String() string {
|
||||
x, _ := json.Marshal(b)
|
||||
return string(x)
|
||||
}
|
||||
|
||||
// NewBox stub from the name and the path provided
|
||||
func NewBox(name string, path string) *Box {
|
||||
if len(name) == 0 {
|
||||
name = path
|
||||
}
|
||||
name = strings.Replace(name, "\"", "", -1)
|
||||
pwd, _ := os.Getwd()
|
||||
box := &Box{
|
||||
Name: name,
|
||||
Path: path,
|
||||
PWD: pwd,
|
||||
}
|
||||
return box
|
||||
}
|
||||
54
vendor/github.com/gobuffalo/packr/v2/jam/parser/file.go
generated
vendored
Normal file
54
vendor/github.com/gobuffalo/packr/v2/jam/parser/file.go
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
package parser
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
// File that is to be parsed
|
||||
type File struct {
|
||||
io.Reader
|
||||
Path string
|
||||
AbsPath string
|
||||
}
|
||||
|
||||
// Name of the file "app.go"
|
||||
func (f File) Name() string {
|
||||
return f.Path
|
||||
}
|
||||
|
||||
// String returns the contents of the reader
|
||||
func (f *File) String() string {
|
||||
src, _ := ioutil.ReadAll(f)
|
||||
f.Reader = bytes.NewReader(src)
|
||||
return string(src)
|
||||
}
|
||||
|
||||
func (s *File) Write(p []byte) (int, error) {
|
||||
bb := &bytes.Buffer{}
|
||||
i, err := bb.Write(p)
|
||||
s.Reader = bb
|
||||
return i, err
|
||||
}
|
||||
|
||||
// NewFile takes the name of the file you want to
|
||||
// write to and a reader to reader from
|
||||
func NewFile(path string, r io.Reader) *File {
|
||||
if r == nil {
|
||||
r = &bytes.Buffer{}
|
||||
}
|
||||
if seek, ok := r.(io.Seeker); ok {
|
||||
seek.Seek(0, 0)
|
||||
}
|
||||
abs := path
|
||||
if !filepath.IsAbs(path) {
|
||||
abs, _ = filepath.Abs(path)
|
||||
}
|
||||
return &File{
|
||||
Reader: r,
|
||||
Path: path,
|
||||
AbsPath: abs,
|
||||
}
|
||||
}
|
||||
101
vendor/github.com/gobuffalo/packr/v2/jam/parser/finder.go
generated
vendored
Normal file
101
vendor/github.com/gobuffalo/packr/v2/jam/parser/finder.go
generated
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
package parser
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go/build"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gobuffalo/packr/v2/plog"
|
||||
"github.com/karrick/godirwalk"
|
||||
"github.com/markbates/oncer"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
type finder struct {
|
||||
id time.Time
|
||||
}
|
||||
|
||||
func (fd *finder) key(m, dir string) string {
|
||||
return fmt.Sprintf("%s-*parser.finder#%s-%s", fd.id, m, dir)
|
||||
}
|
||||
|
||||
// findAllGoFiles *.go files for a given diretory
|
||||
func (fd *finder) findAllGoFiles(dir string) ([]string, error) {
|
||||
var err error
|
||||
var names []string
|
||||
oncer.Do(fd.key("findAllGoFiles", dir), func() {
|
||||
plog.Debug(fd, "findAllGoFiles", "dir", dir)
|
||||
|
||||
callback := func(path string, do *godirwalk.Dirent) error {
|
||||
ext := filepath.Ext(path)
|
||||
if ext != ".go" {
|
||||
return nil
|
||||
}
|
||||
names = append(names, path)
|
||||
return nil
|
||||
}
|
||||
err = godirwalk.Walk(dir, &godirwalk.Options{
|
||||
FollowSymbolicLinks: true,
|
||||
Callback: callback,
|
||||
})
|
||||
})
|
||||
|
||||
return names, err
|
||||
}
|
||||
|
||||
func (fd *finder) findAllGoFilesImports(dir string) ([]string, error) {
|
||||
var err error
|
||||
var names []string
|
||||
oncer.Do(fd.key("findAllGoFilesImports", dir), func() {
|
||||
ctx := build.Default
|
||||
|
||||
if len(ctx.SrcDirs()) == 0 {
|
||||
err = errors.New("no src directories found")
|
||||
return
|
||||
}
|
||||
|
||||
pkg, err := ctx.ImportDir(dir, 0)
|
||||
if strings.HasPrefix(pkg.ImportPath, "github.com/gobuffalo/packr") {
|
||||
return
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
if !strings.Contains(err.Error(), "cannot find package") {
|
||||
if _, ok := errors.Cause(err).(*build.NoGoError); !ok {
|
||||
err = errors.WithStack(err)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if pkg.Goroot {
|
||||
return
|
||||
}
|
||||
if len(pkg.GoFiles) <= 0 {
|
||||
return
|
||||
}
|
||||
|
||||
plog.Debug(fd, "findAllGoFilesImports", "dir", dir)
|
||||
|
||||
names, _ = fd.findAllGoFiles(dir)
|
||||
for _, n := range pkg.GoFiles {
|
||||
names = append(names, filepath.Join(pkg.Dir, n))
|
||||
}
|
||||
for _, imp := range pkg.Imports {
|
||||
if len(ctx.SrcDirs()) == 0 {
|
||||
continue
|
||||
}
|
||||
d := ctx.SrcDirs()[len(ctx.SrcDirs())-1]
|
||||
ip := filepath.Join(d, imp)
|
||||
n, err := fd.findAllGoFilesImports(ip)
|
||||
if err != nil && len(n) != 0 {
|
||||
names = n
|
||||
return
|
||||
}
|
||||
names = append(names, n...)
|
||||
}
|
||||
})
|
||||
return names, err
|
||||
}
|
||||
47
vendor/github.com/gobuffalo/packr/v2/jam/parser/parser.go
generated
vendored
Normal file
47
vendor/github.com/gobuffalo/packr/v2/jam/parser/parser.go
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
package parser
|
||||
|
||||
import (
|
||||
"os"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/gobuffalo/packr/v2/plog"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// Parser to find boxes
|
||||
type Parser struct {
|
||||
Prospects []*File // a list of files to check for boxes
|
||||
IgnoreImports bool
|
||||
}
|
||||
|
||||
// Run the parser and run any boxes found
|
||||
func (p *Parser) Run() (Boxes, error) {
|
||||
var boxes Boxes
|
||||
for _, pros := range p.Prospects {
|
||||
plog.Debug(p, "Run", "parsing", pros.Name())
|
||||
v := NewVisitor(pros)
|
||||
pbr, err := v.Run()
|
||||
if err != nil {
|
||||
return boxes, errors.WithStack(err)
|
||||
}
|
||||
for _, b := range pbr {
|
||||
plog.Debug(p, "Run", "file", pros.Name(), "box", b.Name)
|
||||
boxes = append(boxes, b)
|
||||
}
|
||||
}
|
||||
|
||||
pwd, _ := os.Getwd()
|
||||
sort.Slice(boxes, func(a, b int) bool {
|
||||
b1 := boxes[a]
|
||||
return !strings.HasPrefix(b1.AbsPath, pwd)
|
||||
})
|
||||
return boxes, nil
|
||||
}
|
||||
|
||||
// New Parser from a list of File
|
||||
func New(prospects ...*File) *Parser {
|
||||
return &Parser{
|
||||
Prospects: prospects,
|
||||
}
|
||||
}
|
||||
77
vendor/github.com/gobuffalo/packr/v2/jam/parser/prospect.go
generated
vendored
Normal file
77
vendor/github.com/gobuffalo/packr/v2/jam/parser/prospect.go
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
package parser
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/gobuffalo/packr/v2/file/resolver"
|
||||
"github.com/gobuffalo/packr/v2/plog"
|
||||
)
|
||||
|
||||
var DefaultIgnoredFolders = []string{".", "_", "vendor", "node_modules", "_fixtures"}
|
||||
|
||||
func IsProspect(path string, ignore ...string) (status bool) {
|
||||
// plog.Debug("parser", "IsProspect", "path", path, "ignore", ignore)
|
||||
defer func() {
|
||||
if status {
|
||||
plog.Debug("parser", "IsProspect (TRUE)", "path", path, "status", status)
|
||||
}
|
||||
}()
|
||||
if path == "." {
|
||||
return true
|
||||
}
|
||||
|
||||
ext := filepath.Ext(path)
|
||||
dir := filepath.Dir(path)
|
||||
|
||||
fi, _ := os.Stat(path)
|
||||
if fi != nil {
|
||||
if fi.IsDir() {
|
||||
dir = filepath.Base(path)
|
||||
} else {
|
||||
if len(ext) > 0 {
|
||||
dir = filepath.Base(filepath.Dir(path))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
path = strings.ToLower(path)
|
||||
dir = strings.ToLower(dir)
|
||||
|
||||
if strings.HasSuffix(path, "-packr.go") {
|
||||
return false
|
||||
}
|
||||
|
||||
if strings.HasSuffix(path, "_test.go") {
|
||||
return false
|
||||
}
|
||||
|
||||
ignore = append(ignore, DefaultIgnoredFolders...)
|
||||
for i, x := range ignore {
|
||||
ignore[i] = strings.TrimSpace(strings.ToLower(x))
|
||||
}
|
||||
|
||||
parts := strings.Split(resolver.OsPath(path), string(filepath.Separator))
|
||||
if len(parts) == 0 {
|
||||
return false
|
||||
}
|
||||
|
||||
for _, i := range ignore {
|
||||
for _, p := range parts {
|
||||
if strings.HasPrefix(p, i) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
un := filepath.Base(path)
|
||||
if len(ext) != 0 {
|
||||
un = filepath.Base(filepath.Dir(path))
|
||||
}
|
||||
if strings.HasPrefix(un, "_") {
|
||||
return false
|
||||
}
|
||||
|
||||
return ext == ".go"
|
||||
}
|
||||
90
vendor/github.com/gobuffalo/packr/v2/jam/parser/roots.go
generated
vendored
Normal file
90
vendor/github.com/gobuffalo/packr/v2/jam/parser/roots.go
generated
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
package parser
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/gobuffalo/packr/v2/plog"
|
||||
"github.com/karrick/godirwalk"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
type RootsOptions struct {
|
||||
IgnoreImports bool
|
||||
Ignores []string
|
||||
}
|
||||
|
||||
func (r RootsOptions) String() string {
|
||||
x, _ := json.Marshal(r)
|
||||
return string(x)
|
||||
}
|
||||
|
||||
// NewFromRoots scans the file roots provided and returns a
|
||||
// new Parser containing the prospects
|
||||
func NewFromRoots(roots []string, opts *RootsOptions) (*Parser, error) {
|
||||
if opts == nil {
|
||||
opts = &RootsOptions{}
|
||||
}
|
||||
|
||||
if len(roots) == 0 {
|
||||
pwd, _ := os.Getwd()
|
||||
roots = append(roots, pwd)
|
||||
}
|
||||
p := New()
|
||||
plog.Debug(p, "NewFromRoots", "roots", roots, "options", opts)
|
||||
callback := func(path string, de *godirwalk.Dirent) error {
|
||||
if IsProspect(path, opts.Ignores...) {
|
||||
if de.IsDir() {
|
||||
return nil
|
||||
}
|
||||
roots = append(roots, path)
|
||||
return nil
|
||||
}
|
||||
if de.IsDir() {
|
||||
return filepath.SkipDir
|
||||
}
|
||||
return nil
|
||||
}
|
||||
wopts := &godirwalk.Options{
|
||||
FollowSymbolicLinks: true,
|
||||
Callback: callback,
|
||||
}
|
||||
for _, root := range roots {
|
||||
plog.Debug(p, "NewFromRoots", "walking", root)
|
||||
err := godirwalk.Walk(root, wopts)
|
||||
if err != nil {
|
||||
return p, errors.WithStack(err)
|
||||
}
|
||||
}
|
||||
|
||||
dd := map[string]string{}
|
||||
fd := &finder{id: time.Now()}
|
||||
for _, r := range roots {
|
||||
var names []string
|
||||
if opts.IgnoreImports {
|
||||
names, _ = fd.findAllGoFiles(r)
|
||||
} else {
|
||||
names, _ = fd.findAllGoFilesImports(r)
|
||||
}
|
||||
for _, n := range names {
|
||||
if IsProspect(n) {
|
||||
plog.Debug(p, "NewFromRoots", "mapping", n)
|
||||
dd[n] = n
|
||||
}
|
||||
}
|
||||
}
|
||||
for path := range dd {
|
||||
plog.Debug(p, "NewFromRoots", "reading file", path)
|
||||
b, err := ioutil.ReadFile(path)
|
||||
if err != nil {
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
p.Prospects = append(p.Prospects, NewFile(path, bytes.NewReader(b)))
|
||||
}
|
||||
plog.Debug(p, "NewFromRoots", "found prospects", len(p.Prospects))
|
||||
return p, nil
|
||||
}
|
||||
326
vendor/github.com/gobuffalo/packr/v2/jam/parser/visitor.go
generated
vendored
Normal file
326
vendor/github.com/gobuffalo/packr/v2/jam/parser/visitor.go
generated
vendored
Normal file
@@ -0,0 +1,326 @@
|
||||
package parser
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go/ast"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/gobuffalo/genny"
|
||||
"github.com/gobuffalo/genny/movinglater/gotools"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
type Visitor struct {
|
||||
File genny.File
|
||||
Package string
|
||||
boxes map[string]*Box
|
||||
errors []error
|
||||
}
|
||||
|
||||
func NewVisitor(f *File) *Visitor {
|
||||
return &Visitor{
|
||||
File: f,
|
||||
boxes: map[string]*Box{},
|
||||
errors: []error{},
|
||||
}
|
||||
}
|
||||
|
||||
func (v *Visitor) Run() (Boxes, error) {
|
||||
var boxes Boxes
|
||||
pf, err := gotools.ParseFile(v.File)
|
||||
if err != nil {
|
||||
return boxes, errors.Wrap(err, v.File.Name())
|
||||
}
|
||||
|
||||
v.Package = pf.Ast.Name.Name
|
||||
ast.Walk(v, pf.Ast)
|
||||
|
||||
for _, vb := range v.boxes {
|
||||
boxes = append(boxes, vb)
|
||||
}
|
||||
|
||||
sort.Slice(boxes, func(i, j int) bool {
|
||||
return boxes[i].Name < boxes[j].Name
|
||||
})
|
||||
|
||||
if len(v.errors) > 0 {
|
||||
s := make([]string, len(v.errors))
|
||||
for i, e := range v.errors {
|
||||
s[i] = e.Error()
|
||||
}
|
||||
return boxes, errors.Wrap(errors.New(strings.Join(s, "\n")), v.File.Name())
|
||||
}
|
||||
return boxes, nil
|
||||
}
|
||||
|
||||
func (v *Visitor) Visit(node ast.Node) ast.Visitor {
|
||||
if node == nil {
|
||||
return v
|
||||
}
|
||||
if err := v.eval(node); err != nil {
|
||||
v.errors = append(v.errors, err)
|
||||
}
|
||||
|
||||
return v
|
||||
}
|
||||
|
||||
func (v *Visitor) eval(node ast.Node) error {
|
||||
switch t := node.(type) {
|
||||
case *ast.CallExpr:
|
||||
return v.evalExpr(t)
|
||||
case *ast.Ident:
|
||||
return v.evalIdent(t)
|
||||
case *ast.GenDecl:
|
||||
for _, n := range t.Specs {
|
||||
if err := v.eval(n); err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
}
|
||||
case *ast.FuncDecl:
|
||||
if t.Body == nil {
|
||||
return nil
|
||||
}
|
||||
for _, b := range t.Body.List {
|
||||
if err := v.evalStmt(b); err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
case *ast.ValueSpec:
|
||||
for _, e := range t.Values {
|
||||
if err := v.evalExpr(e); err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (v *Visitor) evalStmt(stmt ast.Stmt) error {
|
||||
switch t := stmt.(type) {
|
||||
case *ast.ExprStmt:
|
||||
return v.evalExpr(t.X)
|
||||
case *ast.AssignStmt:
|
||||
for _, e := range t.Rhs {
|
||||
if err := v.evalArgs(e); err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (v *Visitor) evalExpr(expr ast.Expr) error {
|
||||
switch t := expr.(type) {
|
||||
case *ast.CallExpr:
|
||||
if t.Fun == nil {
|
||||
return nil
|
||||
}
|
||||
for _, a := range t.Args {
|
||||
switch at := a.(type) {
|
||||
case *ast.CallExpr:
|
||||
if sel, ok := t.Fun.(*ast.SelectorExpr); ok {
|
||||
return v.evalSelector(at, sel)
|
||||
}
|
||||
|
||||
if err := v.evalArgs(at); err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
case *ast.CompositeLit:
|
||||
for _, e := range at.Elts {
|
||||
if err := v.evalExpr(e); err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ft, ok := t.Fun.(*ast.SelectorExpr); ok {
|
||||
return v.evalSelector(t, ft)
|
||||
}
|
||||
case *ast.KeyValueExpr:
|
||||
return v.evalExpr(t.Value)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (v *Visitor) evalArgs(expr ast.Expr) error {
|
||||
switch at := expr.(type) {
|
||||
case *ast.CompositeLit:
|
||||
for _, e := range at.Elts {
|
||||
if err := v.evalExpr(e); err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
}
|
||||
case *ast.CallExpr:
|
||||
if at.Fun == nil {
|
||||
return nil
|
||||
}
|
||||
switch st := at.Fun.(type) {
|
||||
case *ast.SelectorExpr:
|
||||
if err := v.evalSelector(at, st); err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
case *ast.Ident:
|
||||
return v.evalIdent(st)
|
||||
}
|
||||
for _, a := range at.Args {
|
||||
if err := v.evalArgs(a); err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (v *Visitor) evalSelector(expr *ast.CallExpr, sel *ast.SelectorExpr) error {
|
||||
x, ok := sel.X.(*ast.Ident)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
if x.Name == "packr" {
|
||||
switch sel.Sel.Name {
|
||||
case "New":
|
||||
if len(expr.Args) != 2 {
|
||||
return errors.New("`New` requires two arguments")
|
||||
}
|
||||
|
||||
zz := func(e ast.Expr) (string, error) {
|
||||
switch at := e.(type) {
|
||||
case *ast.Ident:
|
||||
switch at.Obj.Kind {
|
||||
case ast.Var:
|
||||
if as, ok := at.Obj.Decl.(*ast.AssignStmt); ok {
|
||||
return v.fromVariable(as)
|
||||
}
|
||||
case ast.Con:
|
||||
if vs, ok := at.Obj.Decl.(*ast.ValueSpec); ok {
|
||||
return v.fromConstant(vs)
|
||||
}
|
||||
}
|
||||
return "", v.evalIdent(at)
|
||||
case *ast.BasicLit:
|
||||
return at.Value, nil
|
||||
case *ast.CallExpr:
|
||||
return "", v.evalExpr(at)
|
||||
}
|
||||
return "", errors.Errorf("can't handle %T", e)
|
||||
}
|
||||
|
||||
k1, err := zz(expr.Args[0])
|
||||
if err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
k2, err := zz(expr.Args[1])
|
||||
if err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
v.addBox(k1, k2)
|
||||
|
||||
return nil
|
||||
case "NewBox":
|
||||
for _, e := range expr.Args {
|
||||
switch at := e.(type) {
|
||||
case *ast.Ident:
|
||||
switch at.Obj.Kind {
|
||||
case ast.Var:
|
||||
if as, ok := at.Obj.Decl.(*ast.AssignStmt); ok {
|
||||
v.addVariable("", as)
|
||||
}
|
||||
case ast.Con:
|
||||
if vs, ok := at.Obj.Decl.(*ast.ValueSpec); ok {
|
||||
v.addConstant("", vs)
|
||||
}
|
||||
}
|
||||
return v.evalIdent(at)
|
||||
case *ast.BasicLit:
|
||||
v.addBox("", at.Value)
|
||||
case *ast.CallExpr:
|
||||
return v.evalExpr(at)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (v *Visitor) evalIdent(i *ast.Ident) error {
|
||||
if i.Obj == nil {
|
||||
return nil
|
||||
}
|
||||
if s, ok := i.Obj.Decl.(*ast.AssignStmt); ok {
|
||||
return v.evalStmt(s)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (v *Visitor) addBox(name string, path string) {
|
||||
if len(name) == 0 {
|
||||
name = path
|
||||
}
|
||||
name = strings.Replace(name, "\"", "", -1)
|
||||
path = strings.Replace(path, "\"", "", -1)
|
||||
abs := path
|
||||
if _, ok := v.boxes[name]; !ok {
|
||||
box := NewBox(name, path)
|
||||
box.Package = v.Package
|
||||
|
||||
pd := filepath.Dir(v.File.Name())
|
||||
pwd, _ := os.Getwd()
|
||||
if !filepath.IsAbs(pd) {
|
||||
pd = filepath.Join(pwd, pd)
|
||||
}
|
||||
box.PackageDir = pd
|
||||
|
||||
if !filepath.IsAbs(abs) {
|
||||
abs = filepath.Join(pd, abs)
|
||||
}
|
||||
box.AbsPath = abs
|
||||
v.boxes[name] = box
|
||||
}
|
||||
}
|
||||
func (v *Visitor) fromVariable(as *ast.AssignStmt) (string, error) {
|
||||
if len(as.Rhs) == 1 {
|
||||
if bs, ok := as.Rhs[0].(*ast.BasicLit); ok {
|
||||
return bs.Value, nil
|
||||
}
|
||||
}
|
||||
return "", errors.Wrap(errors.New("unable to find value from variable"), fmt.Sprint(as))
|
||||
}
|
||||
|
||||
func (v *Visitor) addVariable(bn string, as *ast.AssignStmt) error {
|
||||
bv, err := v.fromVariable(as)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
if len(bn) == 0 {
|
||||
bn = bv
|
||||
}
|
||||
v.addBox(bn, bv)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (v *Visitor) fromConstant(vs *ast.ValueSpec) (string, error) {
|
||||
if len(vs.Values) == 1 {
|
||||
if bs, ok := vs.Values[0].(*ast.BasicLit); ok {
|
||||
return bs.Value, nil
|
||||
}
|
||||
}
|
||||
return "", errors.Wrap(errors.New("unable to find value from constant"), fmt.Sprint(vs))
|
||||
}
|
||||
|
||||
func (v *Visitor) addConstant(bn string, vs *ast.ValueSpec) error {
|
||||
if len(vs.Values) == 1 {
|
||||
if bs, ok := vs.Values[0].(*ast.BasicLit); ok {
|
||||
bv := bs.Value
|
||||
if len(bn) == 0 {
|
||||
bn = bv
|
||||
}
|
||||
v.addBox(bn, bv)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
55
vendor/github.com/gobuffalo/packr/v2/packr.go
generated
vendored
Normal file
55
vendor/github.com/gobuffalo/packr/v2/packr.go
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
package packr
|
||||
|
||||
import (
|
||||
"github.com/gobuffalo/packr/v2/file/resolver"
|
||||
"github.com/gobuffalo/packr/v2/jam/parser"
|
||||
"github.com/gobuffalo/packr/v2/plog"
|
||||
"github.com/markbates/safe"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
var boxes = &boxMap{}
|
||||
|
||||
var _ = safe.Run(func() {
|
||||
p, err := parser.NewFromRoots([]string{}, nil)
|
||||
if err != nil {
|
||||
plog.Logger.Error(err)
|
||||
return
|
||||
}
|
||||
boxes, err := p.Run()
|
||||
if err != nil {
|
||||
plog.Logger.Error(err)
|
||||
return
|
||||
}
|
||||
for _, box := range boxes {
|
||||
b := construct(box.Name, box.AbsPath)
|
||||
_, err = placeBox(b)
|
||||
if err != nil {
|
||||
plog.Logger.Error(err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
func findBox(name string) (*Box, error) {
|
||||
key := resolver.Key(name)
|
||||
plog.Debug("packr", "findBox", "name", name, "key", key)
|
||||
|
||||
b, ok := boxes.Load(key)
|
||||
if !ok {
|
||||
plog.Debug("packr", "findBox", "name", name, "key", key, "found", ok)
|
||||
return nil, errors.Errorf("could not find box %s", name)
|
||||
}
|
||||
|
||||
plog.Debug(b, "found", "box", b)
|
||||
return b, nil
|
||||
}
|
||||
|
||||
func placeBox(b *Box) (*Box, error) {
|
||||
key := resolver.Key(b.Name)
|
||||
eb, _ := boxes.LoadOrStore(key, b)
|
||||
|
||||
plog.Debug("packr", "placeBox", "name", eb.Name, "path", eb.Path, "resolution directory", eb.ResolutionDir)
|
||||
return eb, nil
|
||||
}
|
||||
41
vendor/github.com/gobuffalo/packr/v2/plog/plog.go
generated
vendored
Normal file
41
vendor/github.com/gobuffalo/packr/v2/plog/plog.go
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
package plog
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/gobuffalo/logger"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
var Logger = logger.New(logger.ErrorLevel)
|
||||
|
||||
func Debug(t interface{}, m string, args ...interface{}) {
|
||||
if len(args)%2 == 1 {
|
||||
args = append(args, "")
|
||||
}
|
||||
f := logrus.Fields{}
|
||||
for i := 0; i < len(args); i += 2 {
|
||||
k := fmt.Sprint(args[i])
|
||||
v := args[i+1]
|
||||
if s, ok := v.(fmt.Stringer); ok {
|
||||
f[k] = s.String()
|
||||
continue
|
||||
}
|
||||
if s, ok := v.(string); ok {
|
||||
f[k] = s
|
||||
continue
|
||||
}
|
||||
if b, err := json.Marshal(v); err == nil {
|
||||
f[k] = string(b)
|
||||
continue
|
||||
}
|
||||
f[k] = v
|
||||
}
|
||||
e := Logger.WithFields(f)
|
||||
if s, ok := t.(string); ok {
|
||||
e.Debugf("%s#%s", s, m)
|
||||
return
|
||||
}
|
||||
e.Debugf("%T#%s", t, m)
|
||||
}
|
||||
29
vendor/github.com/gobuffalo/packr/v2/pointer.go
generated
vendored
Normal file
29
vendor/github.com/gobuffalo/packr/v2/pointer.go
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
package packr
|
||||
|
||||
import (
|
||||
"github.com/gobuffalo/packr/v2/file"
|
||||
"github.com/gobuffalo/packr/v2/file/resolver"
|
||||
"github.com/gobuffalo/packr/v2/plog"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
type Pointer struct {
|
||||
ForwardBox string
|
||||
ForwardPath string
|
||||
}
|
||||
|
||||
var _ resolver.Resolver = Pointer{}
|
||||
|
||||
func (p Pointer) Resolve(box string, path string) (file.File, error) {
|
||||
plog.Debug(p, "Resolve", "box", box, "path", path, "forward-box", p.ForwardBox, "forward-path", p.ForwardPath)
|
||||
b, err := findBox(p.ForwardBox)
|
||||
if err != nil {
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
f, err := b.Resolve(p.ForwardPath)
|
||||
if err != nil {
|
||||
return f, errors.WithStack(errors.Wrap(err, path))
|
||||
}
|
||||
plog.Debug(p, "Resolve", "box", box, "path", path, "file", f)
|
||||
return f, nil
|
||||
}
|
||||
9
vendor/github.com/gobuffalo/packr/v2/travis.sh
generated
vendored
Normal file
9
vendor/github.com/gobuffalo/packr/v2/travis.sh
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
go get -t ./...
|
||||
go install -v ./packr2
|
||||
packr2 -v clean
|
||||
packr2 -v
|
||||
go test -v -timeout=5s -race ./...
|
||||
packr2 -v clean
|
||||
go test -v -timeout=5s -race ./...
|
||||
3
vendor/github.com/gobuffalo/packr/v2/version.go
generated
vendored
Normal file
3
vendor/github.com/gobuffalo/packr/v2/version.go
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
package packr
|
||||
|
||||
const Version = "v2.0.0-rc.15"
|
||||
77
vendor/github.com/gobuffalo/packr/v2/walk.go
generated
vendored
Normal file
77
vendor/github.com/gobuffalo/packr/v2/walk.go
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
package packr
|
||||
|
||||
import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/gobuffalo/packd"
|
||||
"github.com/gobuffalo/packr/v2/file"
|
||||
"github.com/gobuffalo/packr/v2/file/resolver"
|
||||
"github.com/gobuffalo/packr/v2/plog"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
type WalkFunc = packd.WalkFunc
|
||||
|
||||
// Walk will traverse the box and call the WalkFunc for each file in the box/folder.
|
||||
func (b *Box) Walk(wf WalkFunc) error {
|
||||
m := map[string]file.File{}
|
||||
|
||||
dr := b.DefaultResolver
|
||||
if dr == nil {
|
||||
cd := resolver.OsPath(b.ResolutionDir)
|
||||
dr = &resolver.Disk{Root: string(cd)}
|
||||
}
|
||||
if fm, ok := dr.(file.FileMappable); ok {
|
||||
for n, f := range fm.FileMap() {
|
||||
m[n] = f
|
||||
}
|
||||
}
|
||||
|
||||
b.moot.RLock()
|
||||
for n, r := range b.resolvers {
|
||||
f, err := r.Resolve("", n)
|
||||
if err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
keep := true
|
||||
for k := range m {
|
||||
if strings.ToLower(k) == strings.ToLower(n) {
|
||||
keep = false
|
||||
}
|
||||
}
|
||||
if keep {
|
||||
m[n] = f
|
||||
}
|
||||
}
|
||||
b.moot.RUnlock()
|
||||
|
||||
var keys = make([]string, 0, len(m))
|
||||
for k := range m {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
sort.Strings(keys)
|
||||
|
||||
for _, k := range keys {
|
||||
osPath := resolver.OsPath(k)
|
||||
plog.Debug(b, "Walk", "path", k, "osPath", osPath)
|
||||
if err := wf(osPath, m[k]); err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// WalkPrefix will call box.Walk and call the WalkFunc when it finds paths that have a matching prefix
|
||||
func (b Box) WalkPrefix(prefix string, wf WalkFunc) error {
|
||||
ipref := resolver.OsPath(prefix)
|
||||
return b.Walk(func(path string, f File) error {
|
||||
ipath := resolver.OsPath(path)
|
||||
if strings.HasPrefix(ipath, ipref) {
|
||||
if err := wf(path, f); err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user