Update github.com/jgautheron/goconst commit hash to cda7ea3 (#228)
Update github.com/jgautheron/goconst commit hash to cda7ea3 Reviewed-on: https://kolaente.dev/vikunja/api/pulls/228
This commit is contained in:
3
vendor/github.com/jgautheron/goconst/go.mod
generated
vendored
Normal file
3
vendor/github.com/jgautheron/goconst/go.mod
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
module github.com/jgautheron/goconst
|
||||
|
||||
go 1.13
|
12
vendor/github.com/jgautheron/goconst/visitor.go
generated
vendored
12
vendor/github.com/jgautheron/goconst/visitor.go
generated
vendored
@ -95,6 +95,15 @@ func (v *treeVisitor) Visit(node ast.Node) ast.Visitor {
|
||||
v.addString(lit.Value, lit.Pos())
|
||||
}
|
||||
}
|
||||
|
||||
// fn("http://")
|
||||
case *ast.CallExpr:
|
||||
for _, item := range t.Args {
|
||||
lit, ok := item.(*ast.BasicLit)
|
||||
if ok && v.isSupported(lit.Kind) {
|
||||
v.addString(lit.Value, lit.Pos())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return v
|
||||
@ -102,7 +111,8 @@ func (v *treeVisitor) Visit(node ast.Node) ast.Visitor {
|
||||
|
||||
// addString adds a string in the map along with its position in the tree.
|
||||
func (v *treeVisitor) addString(str string, pos token.Pos) {
|
||||
str = strings.Replace(str, `"`, "", 2)
|
||||
// Drop first and last character, quote, backquote...
|
||||
str = str[1 : len(str)-1]
|
||||
|
||||
// Ignore empty strings
|
||||
if len(str) == 0 {
|
||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -91,7 +91,7 @@ github.com/hashicorp/hcl/json/token
|
||||
github.com/imdario/mergo
|
||||
# github.com/inconshreveable/mousetrap v1.0.0
|
||||
github.com/inconshreveable/mousetrap
|
||||
# github.com/jgautheron/goconst v0.0.0-20170703170152-9740945f5dcb
|
||||
# github.com/jgautheron/goconst v0.0.0-20200227150835-cda7ea3bf591
|
||||
github.com/jgautheron/goconst
|
||||
github.com/jgautheron/goconst/cmd/goconst
|
||||
# github.com/labstack/echo/v4 v4.1.14
|
||||
|
Reference in New Issue
Block a user