updated dependencies
This commit is contained in:
parent
cd81a04a1e
commit
821557fb77
6
go.mod
6
go.mod
@ -3,15 +3,15 @@ module git.paulbsd.com/paulbsd/fuelprices
|
|||||||
go 1.17
|
go 1.17
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/antchfx/xmlquery v1.3.6
|
github.com/antchfx/xmlquery v1.3.8
|
||||||
github.com/antchfx/xpath v1.2.0 // indirect
|
github.com/antchfx/xpath v1.2.0 // indirect
|
||||||
github.com/gopherjs/gopherjs v0.0.0-20210825203111-a709d8e111b3 // indirect
|
github.com/gopherjs/gopherjs v0.0.0-20210825203111-a709d8e111b3 // indirect
|
||||||
github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab
|
github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab
|
||||||
github.com/smartystreets/assertions v1.2.0 // indirect
|
github.com/smartystreets/assertions v1.2.0 // indirect
|
||||||
github.com/smartystreets/goconvey v1.6.4 // indirect
|
github.com/smartystreets/goconvey v1.6.4 // indirect
|
||||||
golang.org/x/net v0.0.0-20210825183410-e898025ed96a // indirect
|
golang.org/x/net v0.0.0-20211203184738-4852103109b8 // indirect
|
||||||
golang.org/x/text v0.3.7 // indirect
|
golang.org/x/text v0.3.7 // indirect
|
||||||
gopkg.in/ini.v1 v1.62.0
|
gopkg.in/ini.v1 v1.66.2
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
6
go.sum
6
go.sum
@ -46,6 +46,8 @@ github.com/antchfx/xmlquery v1.3.3 h1:HYmadPG0uz8CySdL68rB4DCLKXz2PurCjS3mnkVF4C
|
|||||||
github.com/antchfx/xmlquery v1.3.3/go.mod h1:64w0Xesg2sTaawIdNqMB+7qaW/bSqkQm+ssPaCMWNnc=
|
github.com/antchfx/xmlquery v1.3.3/go.mod h1:64w0Xesg2sTaawIdNqMB+7qaW/bSqkQm+ssPaCMWNnc=
|
||||||
github.com/antchfx/xmlquery v1.3.6 h1:kaEVzH1mNo/2AJZrhZjAaAUTy2Nn2zxGfYYU8jWfXOo=
|
github.com/antchfx/xmlquery v1.3.6 h1:kaEVzH1mNo/2AJZrhZjAaAUTy2Nn2zxGfYYU8jWfXOo=
|
||||||
github.com/antchfx/xmlquery v1.3.6/go.mod h1:64w0Xesg2sTaawIdNqMB+7qaW/bSqkQm+ssPaCMWNnc=
|
github.com/antchfx/xmlquery v1.3.6/go.mod h1:64w0Xesg2sTaawIdNqMB+7qaW/bSqkQm+ssPaCMWNnc=
|
||||||
|
github.com/antchfx/xmlquery v1.3.8 h1:dRnBQM3Vk5BVJFvFwsHOLAox+mEiNw5ZusaUNCrEdoU=
|
||||||
|
github.com/antchfx/xmlquery v1.3.8/go.mod h1:wojC/BxjEkjJt6dPiAqUzoXO5nIMWtxHS8PD8TmN4ks=
|
||||||
github.com/antchfx/xpath v1.1.10/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk=
|
github.com/antchfx/xpath v1.1.10/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk=
|
||||||
github.com/antchfx/xpath v1.1.11 h1:WOFtK8TVAjLm3lbgqeP0arlHpvCEeTANeWZ/csPpJkQ=
|
github.com/antchfx/xpath v1.1.11 h1:WOFtK8TVAjLm3lbgqeP0arlHpvCEeTANeWZ/csPpJkQ=
|
||||||
github.com/antchfx/xpath v1.1.11/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs=
|
github.com/antchfx/xpath v1.1.11/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs=
|
||||||
@ -427,6 +429,8 @@ golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLd
|
|||||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||||
golang.org/x/net v0.0.0-20210825183410-e898025ed96a h1:bRuuGXV8wwSdGTB+CtJf+FjgO1APK1CoO39T4BN/XBw=
|
golang.org/x/net v0.0.0-20210825183410-e898025ed96a h1:bRuuGXV8wwSdGTB+CtJf+FjgO1APK1CoO39T4BN/XBw=
|
||||||
golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
|
golang.org/x/net v0.0.0-20211203184738-4852103109b8 h1:PFkPt/jI9Del3hmFplBtRp8tDhSRpFu7CyRs7VmEC0M=
|
||||||
|
golang.org/x/net v0.0.0-20211203184738-4852103109b8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
@ -687,6 +691,8 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
|||||||
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||||
gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU=
|
gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU=
|
||||||
gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||||
|
gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI=
|
||||||
|
gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||||
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
||||||
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
|
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
|
||||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
|
7
vendor/github.com/antchfx/xmlquery/node.go
generated
vendored
7
vendor/github.com/antchfx/xmlquery/node.go
generated
vendored
@ -71,7 +71,7 @@ func (n *Node) InnerText() string {
|
|||||||
|
|
||||||
func (n *Node) sanitizedData(preserveSpaces bool) string {
|
func (n *Node) sanitizedData(preserveSpaces bool) string {
|
||||||
if preserveSpaces {
|
if preserveSpaces {
|
||||||
return strings.Trim(n.Data, "\n\t")
|
return n.Data
|
||||||
}
|
}
|
||||||
return strings.TrimSpace(n.Data)
|
return strings.TrimSpace(n.Data)
|
||||||
}
|
}
|
||||||
@ -140,12 +140,13 @@ func outputXML(buf *bytes.Buffer, n *Node, preserveSpaces bool) {
|
|||||||
|
|
||||||
// OutputXML returns the text that including tags name.
|
// OutputXML returns the text that including tags name.
|
||||||
func (n *Node) OutputXML(self bool) string {
|
func (n *Node) OutputXML(self bool) string {
|
||||||
|
preserveSpaces := calculatePreserveSpaces(n, false)
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
if self {
|
if self {
|
||||||
outputXML(&buf, n, false)
|
outputXML(&buf, n, preserveSpaces)
|
||||||
} else {
|
} else {
|
||||||
for n := n.FirstChild; n != nil; n = n.NextSibling {
|
for n := n.FirstChild; n != nil; n = n.NextSibling {
|
||||||
outputXML(&buf, n, false)
|
outputXML(&buf, n, preserveSpaces)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
vendor/github.com/antchfx/xmlquery/query.go
generated
vendored
4
vendor/github.com/antchfx/xmlquery/query.go
generated
vendored
@ -277,7 +277,7 @@ func (x *NodeNavigator) MoveToNext() bool {
|
|||||||
}
|
}
|
||||||
for node := x.curr.NextSibling; node != nil; node = x.curr.NextSibling {
|
for node := x.curr.NextSibling; node != nil; node = x.curr.NextSibling {
|
||||||
x.curr = node
|
x.curr = node
|
||||||
if x.curr.Type != TextNode {
|
if x.curr.Type != TextNode || strings.TrimSpace(x.curr.Data) != "" {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -290,7 +290,7 @@ func (x *NodeNavigator) MoveToPrevious() bool {
|
|||||||
}
|
}
|
||||||
for node := x.curr.PrevSibling; node != nil; node = x.curr.PrevSibling {
|
for node := x.curr.PrevSibling; node != nil; node = x.curr.PrevSibling {
|
||||||
x.curr = node
|
x.curr = node
|
||||||
if x.curr.Type != TextNode {
|
if x.curr.Type != TextNode || strings.TrimSpace(x.curr.Data) != "" {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
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/README.md
generated
vendored
2
vendor/gopkg.in/ini.v1/README.md
generated
vendored
@ -24,7 +24,7 @@ Package ini provides INI file read and write functionality in Go.
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
The minimum requirement of Go is **1.6**.
|
The minimum requirement of Go is **1.12**.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ go get gopkg.in/ini.v1
|
$ go get gopkg.in/ini.v1
|
||||||
|
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%
|
threshold: 1%
|
||||||
|
|
||||||
comment:
|
comment:
|
||||||
layout: 'diff, files'
|
layout: 'diff'
|
||||||
|
11
vendor/gopkg.in/ini.v1/file.go
generated
vendored
11
vendor/gopkg.in/ini.v1/file.go
generated
vendored
@ -142,6 +142,12 @@ func (f *File) GetSection(name string) (*Section, error) {
|
|||||||
return secs[0], err
|
return secs[0], err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HasSection returns true if the file contains a section with given name.
|
||||||
|
func (f *File) HasSection(name string) bool {
|
||||||
|
section, _ := f.GetSection(name)
|
||||||
|
return section != nil
|
||||||
|
}
|
||||||
|
|
||||||
// SectionsByName returns all sections with given name.
|
// SectionsByName returns all sections with given name.
|
||||||
func (f *File) SectionsByName(name string) ([]*Section, error) {
|
func (f *File) SectionsByName(name string) ([]*Section, error) {
|
||||||
if len(name) == 0 {
|
if len(name) == 0 {
|
||||||
@ -168,8 +174,9 @@ func (f *File) SectionsByName(name string) ([]*Section, error) {
|
|||||||
func (f *File) Section(name string) *Section {
|
func (f *File) Section(name string) *Section {
|
||||||
sec, err := f.GetSection(name)
|
sec, err := f.GetSection(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Note: It's OK here because the only possible error is empty section name,
|
if name == "" {
|
||||||
// but if it's empty, this piece of code won't be executed.
|
name = DefaultSection
|
||||||
|
}
|
||||||
sec, _ = f.NewSection(name)
|
sec, _ = f.NewSection(name)
|
||||||
return sec
|
return sec
|
||||||
}
|
}
|
||||||
|
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
|
// Copyright 2014 Unknwon
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License"): you may
|
// Licensed under the Apache License, Version 2.0 (the "License"): you may
|
||||||
@ -125,6 +123,8 @@ type LoadOptions struct {
|
|||||||
ReaderBufferSize int
|
ReaderBufferSize int
|
||||||
// AllowNonUniqueSections indicates whether to allow sections with the same name multiple times.
|
// AllowNonUniqueSections indicates whether to allow sections with the same name multiple times.
|
||||||
AllowNonUniqueSections bool
|
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.
|
// DebugFunc is the type of function called to log parse events.
|
||||||
|
5
vendor/gopkg.in/ini.v1/key.go
generated
vendored
5
vendor/gopkg.in/ini.v1/key.go
generated
vendored
@ -54,6 +54,7 @@ func (k *Key) addShadow(val string) error {
|
|||||||
return errors.New("cannot add shadow to auto-increment or boolean key")
|
return errors.New("cannot add shadow to auto-increment or boolean key")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !k.s.f.options.AllowDuplicateShadowValues {
|
||||||
// Deduplicate shadows based on their values.
|
// Deduplicate shadows based on their values.
|
||||||
if k.value == val {
|
if k.value == val {
|
||||||
return nil
|
return nil
|
||||||
@ -63,6 +64,7 @@ func (k *Key) addShadow(val string) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
shadow := newKey(k.s, k.name, val)
|
shadow := newKey(k.s, k.name, val)
|
||||||
shadow.isShadow = true
|
shadow.isShadow = true
|
||||||
@ -781,10 +783,8 @@ func (k *Key) parseUint64s(strs []string, addInvalid, returnOnInvalid bool) ([]u
|
|||||||
return vals, err
|
return vals, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
type Parser func(str string) (interface{}, error)
|
type Parser func(str string) (interface{}, error)
|
||||||
|
|
||||||
|
|
||||||
// parseTimesFormat transforms strings to times in given format.
|
// parseTimesFormat transforms strings to times in given format.
|
||||||
func (k *Key) parseTimesFormat(format string, strs []string, addInvalid, returnOnInvalid bool) ([]time.Time, error) {
|
func (k *Key) parseTimesFormat(format string, strs []string, addInvalid, returnOnInvalid bool) ([]time.Time, error) {
|
||||||
vals := make([]time.Time, 0, len(strs))
|
vals := make([]time.Time, 0, len(strs))
|
||||||
@ -801,7 +801,6 @@ func (k *Key) parseTimesFormat(format string, strs []string, addInvalid, returnO
|
|||||||
return vals, err
|
return vals, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// doParse transforms strings to different types
|
// doParse transforms strings to different types
|
||||||
func (k *Key) doParse(strs []string, addInvalid, returnOnInvalid bool, parser Parser) ([]interface{}, error) {
|
func (k *Key) doParse(strs []string, addInvalid, returnOnInvalid bool, parser Parser) ([]interface{}, error) {
|
||||||
vals := make([]interface{}, 0, len(strs))
|
vals := make([]interface{}, 0, len(strs))
|
||||||
|
38
vendor/gopkg.in/ini.v1/parser.go
generated
vendored
38
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.
|
// Check if key name surrounded by quotes.
|
||||||
var keyQuote string
|
var keyQuote string
|
||||||
if line[0] == '"' {
|
if line[0] == '"' {
|
||||||
if len(line) > 6 && string(line[0:3]) == `"""` {
|
if len(line) > 6 && line[0:3] == `"""` {
|
||||||
keyQuote = `"""`
|
keyQuote = `"""`
|
||||||
} else {
|
} else {
|
||||||
keyQuote = `"`
|
keyQuote = `"`
|
||||||
@ -232,7 +232,7 @@ func (p *parser) readValue(in []byte, bufferSize int) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var valQuote string
|
var valQuote string
|
||||||
if len(line) > 3 && string(line[0:3]) == `"""` {
|
if len(line) > 3 && line[0:3] == `"""` {
|
||||||
valQuote = `"""`
|
valQuote = `"""`
|
||||||
} else if line[0] == '`' {
|
} else if line[0] == '`' {
|
||||||
valQuote = "`"
|
valQuote = "`"
|
||||||
@ -289,12 +289,8 @@ func (p *parser) readValue(in []byte, bufferSize int) (string, error) {
|
|||||||
hasSurroundedQuote(line, '"')) && !p.options.PreserveSurroundedQuote {
|
hasSurroundedQuote(line, '"')) && !p.options.PreserveSurroundedQuote {
|
||||||
line = line[1 : len(line)-1]
|
line = line[1 : len(line)-1]
|
||||||
} else if len(valQuote) == 0 && p.options.UnescapeValueCommentSymbols {
|
} else if len(valQuote) == 0 && p.options.UnescapeValueCommentSymbols {
|
||||||
if strings.Contains(line, `\;`) {
|
line = strings.ReplaceAll(line, `\;`, ";")
|
||||||
line = strings.Replace(line, `\;`, ";", -1)
|
line = strings.ReplaceAll(line, `\#`, "#")
|
||||||
}
|
|
||||||
if strings.Contains(line, `\#`) {
|
|
||||||
line = strings.Replace(line, `\#`, "#", -1)
|
|
||||||
}
|
|
||||||
} else if p.options.AllowPythonMultilineValues && lastChar == '\n' {
|
} else if p.options.AllowPythonMultilineValues && lastChar == '\n' {
|
||||||
return p.readPythonMultilines(line, bufferSize)
|
return p.readPythonMultilines(line, bufferSize)
|
||||||
}
|
}
|
||||||
@ -306,15 +302,9 @@ func (p *parser) readPythonMultilines(line string, bufferSize int) (string, erro
|
|||||||
parserBufferPeekResult, _ := p.buf.Peek(bufferSize)
|
parserBufferPeekResult, _ := p.buf.Peek(bufferSize)
|
||||||
peekBuffer := bytes.NewBuffer(parserBufferPeekResult)
|
peekBuffer := bytes.NewBuffer(parserBufferPeekResult)
|
||||||
|
|
||||||
indentSize := 0
|
|
||||||
for {
|
for {
|
||||||
peekData, peekErr := peekBuffer.ReadBytes('\n')
|
peekData, peekErr := peekBuffer.ReadBytes('\n')
|
||||||
if peekErr != nil {
|
if peekErr != nil && peekErr != io.EOF {
|
||||||
if peekErr == io.EOF {
|
|
||||||
p.debug("readPythonMultilines: io.EOF, peekData: %q, line: %q", string(peekData), line)
|
|
||||||
return line, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
p.debug("readPythonMultilines: failed to peek with error: %v", peekErr)
|
p.debug("readPythonMultilines: failed to peek with error: %v", peekErr)
|
||||||
return "", peekErr
|
return "", peekErr
|
||||||
}
|
}
|
||||||
@ -333,19 +323,6 @@ func (p *parser) readPythonMultilines(line string, bufferSize int) (string, erro
|
|||||||
return line, nil
|
return line, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Determine indent size and line prefix.
|
|
||||||
currentIndentSize := len(peekMatches[1])
|
|
||||||
if indentSize < 1 {
|
|
||||||
indentSize = currentIndentSize
|
|
||||||
p.debug("readPythonMultilines: indent size is %d", indentSize)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make sure each line is indented at least as far as first line.
|
|
||||||
if currentIndentSize < indentSize {
|
|
||||||
p.debug("readPythonMultilines: end of value, current indent: %d, expected indent: %d, line: %q", currentIndentSize, indentSize, line)
|
|
||||||
return line, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Advance the parser reader (buffer) in-sync with the peek buffer.
|
// Advance the parser reader (buffer) in-sync with the peek buffer.
|
||||||
_, err := p.buf.Discard(len(peekData))
|
_, err := p.buf.Discard(len(peekData))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -353,8 +330,7 @@ func (p *parser) readPythonMultilines(line string, bufferSize int) (string, erro
|
|||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle indented empty line.
|
line += "\n" + peekMatches[0]
|
||||||
line += "\n" + peekMatches[1][indentSize:] + peekMatches[2]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -465,6 +441,8 @@ func (f *File) parse(reader io.Reader) (err error) {
|
|||||||
// Reset auto-counter and comments
|
// Reset auto-counter and comments
|
||||||
p.comment.Reset()
|
p.comment.Reset()
|
||||||
p.count = 1
|
p.count = 1
|
||||||
|
// Nested values can't span sections
|
||||||
|
isLastValueEmpty = false
|
||||||
|
|
||||||
inUnparseableSection = false
|
inUnparseableSection = false
|
||||||
for i := range f.options.UnparseableSections {
|
for i := range f.options.UnparseableSections {
|
||||||
|
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()
|
defer s.f.lock.RUnlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
hash := map[string]string{}
|
hash := make(map[string]string, len(s.keysHash))
|
||||||
for key, value := range s.keysHash {
|
for key, value := range s.keysHash {
|
||||||
hash[key] = value
|
hash[key] = value
|
||||||
}
|
}
|
||||||
|
6
vendor/modules.txt
vendored
6
vendor/modules.txt
vendored
@ -1,4 +1,4 @@
|
|||||||
# github.com/antchfx/xmlquery v1.3.6
|
# github.com/antchfx/xmlquery v1.3.8
|
||||||
## explicit; go 1.14
|
## explicit; go 1.14
|
||||||
github.com/antchfx/xmlquery
|
github.com/antchfx/xmlquery
|
||||||
# github.com/antchfx/xpath v1.2.0
|
# github.com/antchfx/xpath v1.2.0
|
||||||
@ -40,7 +40,7 @@ github.com/influxdata/influxdb1-client/v2
|
|||||||
## explicit; go 1.17
|
## explicit; go 1.17
|
||||||
# golang.org/x/mod v0.5.0
|
# golang.org/x/mod v0.5.0
|
||||||
## explicit; go 1.17
|
## explicit; go 1.17
|
||||||
# golang.org/x/net v0.0.0-20210825183410-e898025ed96a
|
# golang.org/x/net v0.0.0-20211203184738-4852103109b8
|
||||||
## explicit; go 1.17
|
## explicit; go 1.17
|
||||||
golang.org/x/net/html
|
golang.org/x/net/html
|
||||||
golang.org/x/net/html/atom
|
golang.org/x/net/html/atom
|
||||||
@ -76,6 +76,6 @@ golang.org/x/text/transform
|
|||||||
## explicit; go 1.11
|
## explicit; go 1.11
|
||||||
# google.golang.org/protobuf v1.26.0
|
# google.golang.org/protobuf v1.26.0
|
||||||
## explicit; go 1.9
|
## explicit; go 1.9
|
||||||
# gopkg.in/ini.v1 v1.62.0
|
# gopkg.in/ini.v1 v1.66.2
|
||||||
## explicit
|
## explicit
|
||||||
gopkg.in/ini.v1
|
gopkg.in/ini.v1
|
||||||
|
Loading…
Reference in New Issue
Block a user