Update github.com/shurcooL/vfsgen commit hash to 92b8a71 (#599)

Update github.com/shurcooL/vfsgen commit hash to 92b8a71

Reviewed-on: https://kolaente.dev/vikunja/api/pulls/599
This commit is contained in:
renovate 2020-06-27 18:50:08 +00:00 committed by konrad
parent 08205008e7
commit 780a654f65
18 changed files with 8 additions and 1562 deletions

6
go.mod
View file

@ -18,7 +18,7 @@ module code.vikunja.io/api
require ( require (
4d63.com/embedfiles v1.0.0 // indirect 4d63.com/embedfiles v1.0.0 // indirect
4d63.com/tz v1.1.0 4d63.com/tz v1.1.0 // indirect
code.vikunja.io/web v0.0.0-20200618164749-a5f3d450d39a code.vikunja.io/web v0.0.0-20200618164749-a5f3d450d39a
gitea.com/xorm/xorm-redis-cache v0.2.0 gitea.com/xorm/xorm-redis-cache v0.2.0
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
@ -46,7 +46,7 @@ require (
github.com/labstack/gommon v0.3.0 github.com/labstack/gommon v0.3.0
github.com/laurent22/ical-go v0.1.1-0.20181107184520-7e5d6ade8eef github.com/laurent22/ical-go v0.1.1-0.20181107184520-7e5d6ade8eef
github.com/lib/pq v1.7.0 github.com/lib/pq v1.7.0
github.com/magiconair/properties v1.8.1 github.com/magiconair/properties v1.8.1 // indirect
github.com/mailru/easyjson v0.7.0 // indirect github.com/mailru/easyjson v0.7.0 // indirect
github.com/mattn/go-sqlite3 v2.0.3+incompatible github.com/mattn/go-sqlite3 v2.0.3+incompatible
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
@ -59,7 +59,7 @@ require (
github.com/prometheus/client_golang v1.7.1 github.com/prometheus/client_golang v1.7.1
github.com/samedi/caldav-go v3.0.0+incompatible github.com/samedi/caldav-go v3.0.0+incompatible
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749
github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd github.com/shurcooL/vfsgen v0.0.0-20200627165143-92b8a710ab6c
github.com/spf13/afero v1.3.0 github.com/spf13/afero v1.3.0
github.com/spf13/cobra v1.0.0 github.com/spf13/cobra v1.0.0
github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect

2
go.sum
View file

@ -522,6 +522,8 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5I
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd h1:ug7PpSOB5RBPK1Kg6qskGBoP3Vnj/aNYFTznWvlkGo0= github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd h1:ug7PpSOB5RBPK1Kg6qskGBoP3Vnj/aNYFTznWvlkGo0=
github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
github.com/shurcooL/vfsgen v0.0.0-20200627165143-92b8a710ab6c h1:XLPw6rny9Vrrvrzhw8pNLrC2+x/kH0a/3gOx5xWDa6Y=
github.com/shurcooL/vfsgen v0.0.0-20200627165143-92b8a710ab6c/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=

19
vendor/4d63.com/embedfiles/LICENSE generated vendored
View file

@ -1,19 +0,0 @@
Copyright (c) 2017, Leigh McCulloch
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.

74
vendor/4d63.com/embedfiles/README.md generated vendored
View file

@ -1,74 +0,0 @@
# embedfiles
[![Go Report Card](https://goreportcard.com/badge/github.com/leighmcculloch/embedfiles)](https://goreportcard.com/report/github.com/leighmcculloch/embedfiles)
Embedfiles is a tool for embedding files into Go code.
Files are stored in a map of filenames to file data.
## Install
### Source
```
go get 4d63.com/embedfiles
```
## Usage
```
$ embedfiles
Embedfiles embeds files into a map in a go file.
Usage:
embedfiles -out=files.go -pkg=main <paths>
Flags:
-file-names-var string
name of the generated file names slice (default "fileNames")
-files-var string
name of the generated files slice (default "files")
-out file
output go file (default "files.go")
-pkg package
package name of the go file (default "main")
-verbose
```
## Example
Given files:
```
$ echo "hello world" > file1
$ mkdir morefiles
$ echo "who are you?" > morefiles/file2
```
Embed with `embedfiles`:
```
$ embedfiles file1 morefiles
```
A new file `files.go` is created:
```
$ cat files.go
// Generated by 4d63.com/embedfiles.
package main
var fileNames = []string{
"file1", "morefiles/file2",
}
var files = map[string][]byte{
"file1": []byte{
31, 139, 8, 0, 0, 0, 0, 0, 2, 255, 202, 72, 205, 201, 201, 87, 40, 207, 47, 202, 73, 225, 2, 4, 0, 0, 255, 255, 45, 59, 8, 175, 12, 0, 0, 0,
},
"morefiles/file2": []byte{
31, 139, 8, 0, 0, 0, 0, 0, 2, 255, 42, 207, 200, 87, 72, 44, 74, 85, 168, 204, 47, 181, 231, 2, 4, 0, 0, 255, 255, 138, 46, 37, 108, 13, 0, 0, 0,
},
}
```

3
vendor/4d63.com/embedfiles/go.mod generated vendored
View file

@ -1,3 +0,0 @@
module 4d63.com/embedfiles
go 1.13

125
vendor/4d63.com/embedfiles/main.go generated vendored
View file

@ -1,125 +0,0 @@
package main // import "4d63.com/embedfiles"
import (
"bytes"
"flag"
"fmt"
"go/format"
"io/ioutil"
"os"
"path/filepath"
"text/template"
)
const tmpl = `
// Generated by 4d63.com/embedfiles.
package {{.Package}}
var {{.FileNamesVar}} = []string{ {{range $name, $bytes := .Files}}"{{$name}}",{{end}} }
var {{.FilesVar}} = map[string][]byte{
{{range $name, $bytes := .Files}}
"{{$name}}": []byte{ {{range $bytes}}{{.}},{{end}} },
{{end}}
}
`
type tmplData struct {
Package string
Files map[string][]byte
FileNamesVar string
FilesVar string
}
func main() {
out := flag.String("out", "files.go", "output go `file`")
pkg := flag.String("pkg", "main", "`package` name of the go file")
filesVar := flag.String("files-var", "files", "name of the generated files slice")
fileNamesVar := flag.String("file-names-var", "fileNames", "name of the generated file names slice")
verbose := flag.Bool("verbose", false, "")
flag.Usage = func() {
fmt.Fprintf(os.Stderr, "Embedfiles embeds files in the paths into a map in a go file.\n\n")
fmt.Fprintf(os.Stderr, "Usage:\n\n")
fmt.Fprintf(os.Stderr, " embedfiles -out=files.go -pkg=main <paths>\n\n")
fmt.Fprintf(os.Stderr, "Flags:\n\n")
flag.PrintDefaults()
}
flag.Parse()
inputPaths := flag.Args()
if len(inputPaths) == 0 {
flag.Usage()
return
}
f, err := os.Create(*out)
if err != nil {
printErr("creating file", err)
return
}
files := map[string][]byte{}
for _, inputPath := range inputPaths {
err = filepath.Walk(inputPath, func(path string, info os.FileInfo, err error) error {
if err != nil {
return fmt.Errorf("walking: %s", err)
}
if info.IsDir() {
return nil
}
if *verbose {
fmt.Printf("%s ", path)
}
contents, err := ioutil.ReadFile(path)
if err != nil {
return fmt.Errorf("reading file: %s", err)
}
if *verbose {
fmt.Printf("(%d bytes)\n", len(contents))
}
path = filepath.ToSlash(path)
files[path] = contents
return nil
})
if err != nil {
printErr("walking", err)
return
}
}
t, err := template.New("").Parse(tmpl)
if err != nil {
printErr("parsing template", err)
return
}
buf := bytes.Buffer{}
err = t.Execute(&buf, &tmplData{Package: *pkg, Files: files, FilesVar: *filesVar, FileNamesVar: *fileNamesVar})
if err != nil {
printErr("generating code", err)
return
}
formatted, err := format.Source(buf.Bytes())
if err != nil {
printErr("formatting code", err)
return
}
f.Write(formatted)
err = f.Close()
if err != nil {
printErr("finalizing file", err)
return
}
}
func printErr(doing string, err error) {
fmt.Fprintf(os.Stderr, "Error %s: %s\n", doing, err)
}

1
vendor/4d63.com/tz/.gitignore generated vendored
View file

@ -1 +0,0 @@
zoneinfo/

12
vendor/4d63.com/tz/.travis.yml generated vendored
View file

@ -1,12 +0,0 @@
language: go
go:
- "1.x"
go_import_path: 4d63.com/tz
script:
- go test -coverprofile=coverage.txt
after_success:
- bash <(curl -s https://codecov.io/bash)

53
vendor/4d63.com/tz/LICENSE generated vendored
View file

@ -1,53 +0,0 @@
MIT License
Copyright (c) 2018 Leigh McCulloch
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.
--------------------------------------------------------------------------------
zoneinfo.go generated from /lib/time/zoneinfo.zip from Go.
Copyright (c) 2009 The Go Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

19
vendor/4d63.com/tz/README.md generated vendored
View file

@ -1,19 +0,0 @@
# tz
[![Build Status](https://img.shields.io/travis/leighmcculloch/go-tz.svg)](https://travis-ci.org/leighmcculloch/go-tz)
[![Codecov](https://img.shields.io/codecov/c/github/leighmcculloch/go-tz.svg)](https://codecov.io/gh/leighmcculloch/go-tz)
[![Go Report Card](https://goreportcard.com/badge/github.com/leighmcculloch/go-tz)](https://goreportcard.com/report/github.com/leighmcculloch/go-tz)
[![Go docs](https://img.shields.io/badge/godoc-reference-blue.svg)](https://godoc.org/4d63.com/tz)
Predictably load `time.Location`s regardless of operating system.
```
import "4d63.com/tz"
```
```
loc, err := tz.LoadLocation("Australia/Sydney")
```
Docs and examples at https://godoc.org/4d63.com/tz.
This package exists because of https://github.com/golang/go/issues/21881.

5
vendor/4d63.com/tz/go.mod generated vendored
View file

@ -1,5 +0,0 @@
module 4d63.com/tz
go 1.13
require 4d63.com/embedfiles v0.0.0-20190311033909-995e0740726f

2
vendor/4d63.com/tz/go.sum generated vendored
View file

@ -1,2 +0,0 @@
4d63.com/embedfiles v0.0.0-20190311033909-995e0740726f h1:oyYjGRBNq1TxAIG8aHqtxlvqUfzdZf+MbcRb/oweNfY=
4d63.com/embedfiles v0.0.0-20190311033909-995e0740726f/go.mod h1:HxEsUxoVZyRxsZML/S6e2xAuieFMlGO0756ncWx1aXE=

5
vendor/4d63.com/tz/tools.go generated vendored
View file

@ -1,5 +0,0 @@
// +build tools
package tz
import _ "4d63.com/embedfiles"

38
vendor/4d63.com/tz/tz.go generated vendored
View file

@ -1,38 +0,0 @@
// Package tz contains time zone info so that you can predictably load
// Locations regardless of the locations available on the locally running
// operating system.
//
// The stdlib time.LoadLocation function loads timezone data from the operating
// system or from zoneinfo.zip in a local Go installation. Both of these are
// often missing from some operating systems, especially Windows.
//
// This package has the zoneinfo.zip from Go embedded into the package so that
// queries to load a location always return the same data regardless of
// operating system.
//
// This package exists because of https://github.com/golang/go/issues/21881.
package tz // import "4d63.com/tz"
import (
"errors"
"time"
)
//go:generate rm -fr zoneinfo
//go:generate unzip -q $GOROOT/lib/time/zoneinfo.zip -d zoneinfo/
//go:generate go run 4d63.com/embedfiles -out=zoneinfo.go -pkg=tz zoneinfo/
func tzData(name string) ([]byte, bool) {
data, ok := files["zoneinfo/"+name]
return data, ok
}
func LoadLocation(name string) (*time.Location, error) {
if name == "" || name == "UTC" || name == "Local" {
return time.LoadLocation(name)
}
if tzdata, ok := tzData(name); ok {
return time.LoadLocationFromTZData(name, tzdata)
}
return nil, errors.New("unknown location " + name)
}

1194
vendor/4d63.com/tz/zoneinfo.go generated vendored

File diff suppressed because one or more lines are too long

View file

@ -11,6 +11,6 @@ install:
- # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step). - # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step).
script: script:
- go get -t -v ./... - go get -t -v ./...
- diff -u <(echo -n) <(gofmt -d -s .) - diff -n <(echo -n) <(gofmt -d -s .)
- go tool vet . - go vet ./...
- go test -v -race ./... - go test -v -race ./...

View file

@ -4,7 +4,6 @@ import (
"bytes" "bytes"
"compress/gzip" "compress/gzip"
"errors" "errors"
"fmt"
"io" "io"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
@ -48,7 +47,6 @@ func Generate(input http.FileSystem, opt Options) error {
} }
// Write output file (all at once). // Write output file (all at once).
fmt.Println("writing", opt.Filename)
err = ioutil.WriteFile(opt.Filename, buf.Bytes(), 0644) err = ioutil.WriteFile(opt.Filename, buf.Bytes(), 0644)
return err return err
} }

6
vendor/modules.txt vendored
View file

@ -1,7 +1,3 @@
# 4d63.com/embedfiles v1.0.0
4d63.com/embedfiles
# 4d63.com/tz v1.1.0
4d63.com/tz
# code.vikunja.io/web v0.0.0-20200618164749-a5f3d450d39a # code.vikunja.io/web v0.0.0-20200618164749-a5f3d450d39a
code.vikunja.io/web code.vikunja.io/web
code.vikunja.io/web/handler code.vikunja.io/web/handler
@ -189,7 +185,7 @@ github.com/shurcooL/httpfs/path/vfspath
github.com/shurcooL/httpfs/vfsutil github.com/shurcooL/httpfs/vfsutil
# github.com/shurcooL/sanitized_anchor_name v1.0.0 # github.com/shurcooL/sanitized_anchor_name v1.0.0
github.com/shurcooL/sanitized_anchor_name github.com/shurcooL/sanitized_anchor_name
# github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd # github.com/shurcooL/vfsgen v0.0.0-20200627165143-92b8a710ab6c
github.com/shurcooL/vfsgen github.com/shurcooL/vfsgen
# github.com/spf13/afero v1.3.0 # github.com/spf13/afero v1.3.0
github.com/spf13/afero github.com/spf13/afero