1
0
mirror of https://gitcode.com/gitea/gitea.git synced 2025-06-22 21:04:41 +08:00

Use vendored go-swagger ()

* Use vendored go-swagger

* vendor go-swagger

* revert un wanteed change

* remove un-needed GO111MODULE

* Update Makefile

Co-Authored-By: techknowlogick <matti@mdranta.net>
This commit is contained in:
Antoine GIRARD
2019-09-04 21:53:54 +02:00
committed by Lauris BH
parent 4cb1bdddc8
commit 9fe4437bda
686 changed files with 143379 additions and 17 deletions
Makefilego.modgo.sumtools.go
vendor
github.com
PuerkitoBio
asaskevich/govalidator
fsnotify/fsnotify
go-openapi
analysis
errors
inflect
jsonpointer
jsonreference
loads
runtime
spec
strfmt
swag
validate
go-stack/stack
go-swagger/go-swagger
gorilla/handlers
hashicorp/hcl
jessevdk/go-flags
kr
magiconair/properties
mailru/easyjson
mitchellh/mapstructure
pelletier/go-toml
spf13
toqueteos/webbrowser
go.mongodb.org/mongo-driver
golang.org/x
modules.txt

38
vendor/github.com/hashicorp/hcl/lex.go generated vendored Normal file

@ -0,0 +1,38 @@
package hcl
import (
"unicode"
"unicode/utf8"
)
type lexModeValue byte
const (
lexModeUnknown lexModeValue = iota
lexModeHcl
lexModeJson
)
// lexMode returns whether we're going to be parsing in JSON
// mode or HCL mode.
func lexMode(v []byte) lexModeValue {
var (
r rune
w int
offset int
)
for {
r, w = utf8.DecodeRune(v[offset:])
offset += w
if unicode.IsSpace(r) {
continue
}
if r == '{' {
return lexModeJson
}
break
}
return lexModeHcl
}