Update dependencies (#1610)
* Update dependencies * Update module to go 1.17
This commit is contained in:
21
vendor/gopkg.in/ini.v1/.golangci.yml
generated
vendored
Normal file
21
vendor/gopkg.in/ini.v1/.golangci.yml
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
linters-settings:
|
||||
nakedret:
|
||||
max-func-lines: 0 # Disallow any unnamed return statement
|
||||
|
||||
linters:
|
||||
enable:
|
||||
- deadcode
|
||||
- errcheck
|
||||
- gosimple
|
||||
- govet
|
||||
- ineffassign
|
||||
- staticcheck
|
||||
- structcheck
|
||||
- typecheck
|
||||
- unused
|
||||
- varcheck
|
||||
- nakedret
|
||||
- gofmt
|
||||
- rowserrcheck
|
||||
- unconvert
|
||||
- goimports
|
||||
2
vendor/gopkg.in/ini.v1/codecov.yml
generated
vendored
2
vendor/gopkg.in/ini.v1/codecov.yml
generated
vendored
@@ -6,4 +6,4 @@ coverage:
|
||||
threshold: 1%
|
||||
|
||||
comment:
|
||||
layout: 'diff, files'
|
||||
layout: 'diff'
|
||||
|
||||
4
vendor/gopkg.in/ini.v1/ini.go
generated
vendored
4
vendor/gopkg.in/ini.v1/ini.go
generated
vendored
@@ -1,5 +1,3 @@
|
||||
// +build go1.6
|
||||
|
||||
// Copyright 2014 Unknwon
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License"): you may
|
||||
@@ -125,6 +123,8 @@ type LoadOptions struct {
|
||||
ReaderBufferSize int
|
||||
// AllowNonUniqueSections indicates whether to allow sections with the same name multiple times.
|
||||
AllowNonUniqueSections bool
|
||||
// AllowDuplicateShadowValues indicates whether values for shadowed keys should be deduplicated.
|
||||
AllowDuplicateShadowValues bool
|
||||
}
|
||||
|
||||
// DebugFunc is the type of function called to log parse events.
|
||||
|
||||
17
vendor/gopkg.in/ini.v1/key.go
generated
vendored
17
vendor/gopkg.in/ini.v1/key.go
generated
vendored
@@ -54,14 +54,16 @@ func (k *Key) addShadow(val string) error {
|
||||
return errors.New("cannot add shadow to auto-increment or boolean key")
|
||||
}
|
||||
|
||||
// Deduplicate shadows based on their values.
|
||||
if k.value == val {
|
||||
return nil
|
||||
}
|
||||
for i := range k.shadows {
|
||||
if k.shadows[i].value == val {
|
||||
if !k.s.f.options.AllowDuplicateShadowValues {
|
||||
// Deduplicate shadows based on their values.
|
||||
if k.value == val {
|
||||
return nil
|
||||
}
|
||||
for i := range k.shadows {
|
||||
if k.shadows[i].value == val {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
shadow := newKey(k.s, k.name, val)
|
||||
@@ -781,10 +783,8 @@ func (k *Key) parseUint64s(strs []string, addInvalid, returnOnInvalid bool) ([]u
|
||||
return vals, err
|
||||
}
|
||||
|
||||
|
||||
type Parser func(str string) (interface{}, error)
|
||||
|
||||
|
||||
// parseTimesFormat transforms strings to times in given format.
|
||||
func (k *Key) parseTimesFormat(format string, strs []string, addInvalid, returnOnInvalid bool) ([]time.Time, error) {
|
||||
vals := make([]time.Time, 0, len(strs))
|
||||
@@ -801,7 +801,6 @@ func (k *Key) parseTimesFormat(format string, strs []string, addInvalid, returnO
|
||||
return vals, err
|
||||
}
|
||||
|
||||
|
||||
// doParse transforms strings to different types
|
||||
func (k *Key) doParse(strs []string, addInvalid, returnOnInvalid bool, parser Parser) ([]interface{}, error) {
|
||||
vals := make([]interface{}, 0, len(strs))
|
||||
|
||||
12
vendor/gopkg.in/ini.v1/parser.go
generated
vendored
12
vendor/gopkg.in/ini.v1/parser.go
generated
vendored
@@ -131,7 +131,7 @@ func readKeyName(delimiters string, in []byte) (string, int, error) {
|
||||
// Check if key name surrounded by quotes.
|
||||
var keyQuote string
|
||||
if line[0] == '"' {
|
||||
if len(line) > 6 && string(line[0:3]) == `"""` {
|
||||
if len(line) > 6 && line[0:3] == `"""` {
|
||||
keyQuote = `"""`
|
||||
} else {
|
||||
keyQuote = `"`
|
||||
@@ -232,7 +232,7 @@ func (p *parser) readValue(in []byte, bufferSize int) (string, error) {
|
||||
}
|
||||
|
||||
var valQuote string
|
||||
if len(line) > 3 && string(line[0:3]) == `"""` {
|
||||
if len(line) > 3 && line[0:3] == `"""` {
|
||||
valQuote = `"""`
|
||||
} else if line[0] == '`' {
|
||||
valQuote = "`"
|
||||
@@ -289,12 +289,8 @@ func (p *parser) readValue(in []byte, bufferSize int) (string, error) {
|
||||
hasSurroundedQuote(line, '"')) && !p.options.PreserveSurroundedQuote {
|
||||
line = line[1 : len(line)-1]
|
||||
} else if len(valQuote) == 0 && p.options.UnescapeValueCommentSymbols {
|
||||
if strings.Contains(line, `\;`) {
|
||||
line = strings.Replace(line, `\;`, ";", -1)
|
||||
}
|
||||
if strings.Contains(line, `\#`) {
|
||||
line = strings.Replace(line, `\#`, "#", -1)
|
||||
}
|
||||
line = strings.ReplaceAll(line, `\;`, ";")
|
||||
line = strings.ReplaceAll(line, `\#`, "#")
|
||||
} else if p.options.AllowPythonMultilineValues && lastChar == '\n' {
|
||||
return p.readPythonMultilines(line, bufferSize)
|
||||
}
|
||||
|
||||
2
vendor/gopkg.in/ini.v1/section.go
generated
vendored
2
vendor/gopkg.in/ini.v1/section.go
generated
vendored
@@ -217,7 +217,7 @@ func (s *Section) KeysHash() map[string]string {
|
||||
defer s.f.lock.RUnlock()
|
||||
}
|
||||
|
||||
hash := map[string]string{}
|
||||
hash := make(map[string]string, len(s.keysHash))
|
||||
for key, value := range s.keysHash {
|
||||
hash[key] = value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user