mirror of
https://github.com/NotAShelf/catApi.git
synced 2025-10-03 15:33:34 +00:00
bump dependencies
This commit is contained in:
parent
bae551520a
commit
b7319e6bfc
466 changed files with 17912 additions and 12742 deletions
205
vendor/github.com/magiconair/properties/CHANGELOG.md
generated
vendored
205
vendor/github.com/magiconair/properties/CHANGELOG.md
generated
vendored
|
@ -1,205 +0,0 @@
|
|||
## Changelog
|
||||
|
||||
### [1.8.7](https://github.com/magiconair/properties/tree/v1.8.7) - 08 Dec 2022
|
||||
|
||||
* [PR #65](https://github.com/magiconair/properties/pull/65): Speedup Merge
|
||||
|
||||
Thanks to [@AdityaVallabh](https://github.com/AdityaVallabh) for the patch.
|
||||
|
||||
* [PR #66](https://github.com/magiconair/properties/pull/66): use github actions
|
||||
|
||||
### [1.8.6](https://github.com/magiconair/properties/tree/v1.8.6) - 23 Feb 2022
|
||||
|
||||
* [PR #57](https://github.com/magiconair/properties/pull/57):Fix "unreachable code" lint error
|
||||
|
||||
Thanks to [@ellie](https://github.com/ellie) for the patch.
|
||||
|
||||
* [PR #63](https://github.com/magiconair/properties/pull/63): Make TestMustGetParsedDuration backwards compatible
|
||||
|
||||
This patch ensures that the `TestMustGetParsedDuration` still works with `go1.3` to make the
|
||||
author happy until it affects real users.
|
||||
|
||||
Thanks to [@maage](https://github.com/maage) for the patch.
|
||||
|
||||
### [1.8.5](https://github.com/magiconair/properties/tree/v1.8.5) - 24 Mar 2021
|
||||
|
||||
* [PR #55](https://github.com/magiconair/properties/pull/55): Fix: Encoding Bug in Comments
|
||||
|
||||
When reading comments \ are loaded correctly, but when writing they are then
|
||||
replaced by \\. This leads to wrong comments when writing and reading multiple times.
|
||||
|
||||
Thanks to [@doxsch](https://github.com/doxsch) for the patch.
|
||||
|
||||
### [1.8.4](https://github.com/magiconair/properties/tree/v1.8.4) - 23 Sep 2020
|
||||
|
||||
* [PR #50](https://github.com/magiconair/properties/pull/50): enhance error message for circular references
|
||||
|
||||
Thanks to [@sriv](https://github.com/sriv) for the patch.
|
||||
|
||||
### [1.8.3](https://github.com/magiconair/properties/tree/v1.8.3) - 14 Sep 2020
|
||||
|
||||
* [PR #49](https://github.com/magiconair/properties/pull/49): Include the key in error message causing the circular reference
|
||||
|
||||
The change is include the key in the error message which is causing the circular
|
||||
reference when parsing/loading the properties files.
|
||||
|
||||
Thanks to [@haroon-sheikh](https://github.com/haroon-sheikh) for the patch.
|
||||
|
||||
### [1.8.2](https://github.com/magiconair/properties/tree/v1.8.2) - 25 Aug 2020
|
||||
|
||||
* [PR #36](https://github.com/magiconair/properties/pull/36): Escape backslash on write
|
||||
|
||||
This patch ensures that backslashes are escaped on write. Existing applications which
|
||||
rely on the old behavior may need to be updated.
|
||||
|
||||
Thanks to [@apesternikov](https://github.com/apesternikov) for the patch.
|
||||
|
||||
* [PR #42](https://github.com/magiconair/properties/pull/42): Made Content-Type check whitespace agnostic in LoadURL()
|
||||
|
||||
Thanks to [@aliras1](https://github.com/aliras1) for the patch.
|
||||
|
||||
* [PR #41](https://github.com/magiconair/properties/pull/41): Make key/value separator configurable on Write()
|
||||
|
||||
Thanks to [@mkjor](https://github.com/mkjor) for the patch.
|
||||
|
||||
* [PR #40](https://github.com/magiconair/properties/pull/40): Add method to return a sorted list of keys
|
||||
|
||||
Thanks to [@mkjor](https://github.com/mkjor) for the patch.
|
||||
|
||||
### [1.8.1](https://github.com/magiconair/properties/tree/v1.8.1) - 10 May 2019
|
||||
|
||||
* [PR #35](https://github.com/magiconair/properties/pull/35): Close body always after request
|
||||
|
||||
This patch ensures that in `LoadURL` the response body is always closed.
|
||||
|
||||
Thanks to [@liubog2008](https://github.com/liubog2008) for the patch.
|
||||
|
||||
### [1.8](https://github.com/magiconair/properties/tree/v1.8) - 15 May 2018
|
||||
|
||||
* [PR #26](https://github.com/magiconair/properties/pull/26): Disable expansion during loading
|
||||
|
||||
This adds the option to disable property expansion during loading.
|
||||
|
||||
Thanks to [@kmala](https://github.com/kmala) for the patch.
|
||||
|
||||
### [1.7.6](https://github.com/magiconair/properties/tree/v1.7.6) - 14 Feb 2018
|
||||
|
||||
* [PR #29](https://github.com/magiconair/properties/pull/29): Reworked expansion logic to handle more complex cases.
|
||||
|
||||
See PR for an example.
|
||||
|
||||
Thanks to [@yobert](https://github.com/yobert) for the fix.
|
||||
|
||||
### [1.7.5](https://github.com/magiconair/properties/tree/v1.7.5) - 13 Feb 2018
|
||||
|
||||
* [PR #28](https://github.com/magiconair/properties/pull/28): Support duplicate expansions in the same value
|
||||
|
||||
Values which expand the same key multiple times (e.g. `key=${a} ${a}`) will no longer fail
|
||||
with a `circular reference error`.
|
||||
|
||||
Thanks to [@yobert](https://github.com/yobert) for the fix.
|
||||
|
||||
### [1.7.4](https://github.com/magiconair/properties/tree/v1.7.4) - 31 Oct 2017
|
||||
|
||||
* [Issue #23](https://github.com/magiconair/properties/issues/23): Ignore blank lines with whitespaces
|
||||
|
||||
* [PR #24](https://github.com/magiconair/properties/pull/24): Update keys when DisableExpansion is enabled
|
||||
|
||||
Thanks to [@mgurov](https://github.com/mgurov) for the fix.
|
||||
|
||||
### [1.7.3](https://github.com/magiconair/properties/tree/v1.7.3) - 10 Jul 2017
|
||||
|
||||
* [Issue #17](https://github.com/magiconair/properties/issues/17): Add [SetValue()](http://godoc.org/github.com/magiconair/properties#Properties.SetValue) method to set values generically
|
||||
* [Issue #22](https://github.com/magiconair/properties/issues/22): Add [LoadMap()](http://godoc.org/github.com/magiconair/properties#LoadMap) function to load properties from a string map
|
||||
|
||||
### [1.7.2](https://github.com/magiconair/properties/tree/v1.7.2) - 20 Mar 2017
|
||||
|
||||
* [Issue #15](https://github.com/magiconair/properties/issues/15): Drop gocheck dependency
|
||||
* [PR #21](https://github.com/magiconair/properties/pull/21): Add [Map()](http://godoc.org/github.com/magiconair/properties#Properties.Map) and [FilterFunc()](http://godoc.org/github.com/magiconair/properties#Properties.FilterFunc)
|
||||
|
||||
### [1.7.1](https://github.com/magiconair/properties/tree/v1.7.1) - 13 Jan 2017
|
||||
|
||||
* [Issue #14](https://github.com/magiconair/properties/issues/14): Decouple TestLoadExpandedFile from `$USER`
|
||||
* [PR #12](https://github.com/magiconair/properties/pull/12): Load from files and URLs
|
||||
* [PR #16](https://github.com/magiconair/properties/pull/16): Keep gofmt happy
|
||||
* [PR #18](https://github.com/magiconair/properties/pull/18): Fix Delete() function
|
||||
|
||||
### [1.7.0](https://github.com/magiconair/properties/tree/v1.7.0) - 20 Mar 2016
|
||||
|
||||
* [Issue #10](https://github.com/magiconair/properties/issues/10): Add [LoadURL,LoadURLs,MustLoadURL,MustLoadURLs](http://godoc.org/github.com/magiconair/properties#LoadURL) method to load properties from a URL.
|
||||
* [Issue #11](https://github.com/magiconair/properties/issues/11): Add [LoadString,MustLoadString](http://godoc.org/github.com/magiconair/properties#LoadString) method to load properties from an UTF8 string.
|
||||
* [PR #8](https://github.com/magiconair/properties/pull/8): Add [MustFlag](http://godoc.org/github.com/magiconair/properties#Properties.MustFlag) method to provide overrides via command line flags. (@pascaldekloe)
|
||||
|
||||
### [1.6.0](https://github.com/magiconair/properties/tree/v1.6.0) - 11 Dec 2015
|
||||
|
||||
* Add [Decode](http://godoc.org/github.com/magiconair/properties#Properties.Decode) method to populate struct from properties via tags.
|
||||
|
||||
### [1.5.6](https://github.com/magiconair/properties/tree/v1.5.6) - 18 Oct 2015
|
||||
|
||||
* Vendored in gopkg.in/check.v1
|
||||
|
||||
### [1.5.5](https://github.com/magiconair/properties/tree/v1.5.5) - 31 Jul 2015
|
||||
|
||||
* [PR #6](https://github.com/magiconair/properties/pull/6): Add [Delete](http://godoc.org/github.com/magiconair/properties#Properties.Delete) method to remove keys including comments. (@gerbenjacobs)
|
||||
|
||||
### [1.5.4](https://github.com/magiconair/properties/tree/v1.5.4) - 23 Jun 2015
|
||||
|
||||
* [Issue #5](https://github.com/magiconair/properties/issues/5): Allow disabling of property expansion [DisableExpansion](http://godoc.org/github.com/magiconair/properties#Properties.DisableExpansion). When property expansion is disabled Properties become a simple key/value store and don't check for circular references.
|
||||
|
||||
### [1.5.3](https://github.com/magiconair/properties/tree/v1.5.3) - 02 Jun 2015
|
||||
|
||||
* [Issue #4](https://github.com/magiconair/properties/issues/4): Maintain key order in [Filter()](http://godoc.org/github.com/magiconair/properties#Properties.Filter), [FilterPrefix()](http://godoc.org/github.com/magiconair/properties#Properties.FilterPrefix) and [FilterRegexp()](http://godoc.org/github.com/magiconair/properties#Properties.FilterRegexp)
|
||||
|
||||
### [1.5.2](https://github.com/magiconair/properties/tree/v1.5.2) - 10 Apr 2015
|
||||
|
||||
* [Issue #3](https://github.com/magiconair/properties/issues/3): Don't print comments in [WriteComment()](http://godoc.org/github.com/magiconair/properties#Properties.WriteComment) if they are all empty
|
||||
* Add clickable links to README
|
||||
|
||||
### [1.5.1](https://github.com/magiconair/properties/tree/v1.5.1) - 08 Dec 2014
|
||||
|
||||
* Added [GetParsedDuration()](http://godoc.org/github.com/magiconair/properties#Properties.GetParsedDuration) and [MustGetParsedDuration()](http://godoc.org/github.com/magiconair/properties#Properties.MustGetParsedDuration) for values specified compatible with
|
||||
[time.ParseDuration()](http://golang.org/pkg/time/#ParseDuration).
|
||||
|
||||
### [1.5.0](https://github.com/magiconair/properties/tree/v1.5.0) - 18 Nov 2014
|
||||
|
||||
* Added support for single and multi-line comments (reading, writing and updating)
|
||||
* The order of keys is now preserved
|
||||
* Calling [Set()](http://godoc.org/github.com/magiconair/properties#Properties.Set) with an empty key now silently ignores the call and does not create a new entry
|
||||
* Added a [MustSet()](http://godoc.org/github.com/magiconair/properties#Properties.MustSet) method
|
||||
* Migrated test library from launchpad.net/gocheck to [gopkg.in/check.v1](http://gopkg.in/check.v1)
|
||||
|
||||
### [1.4.2](https://github.com/magiconair/properties/tree/v1.4.2) - 15 Nov 2014
|
||||
|
||||
* [Issue #2](https://github.com/magiconair/properties/issues/2): Fixed goroutine leak in parser which created two lexers but cleaned up only one
|
||||
|
||||
### [1.4.1](https://github.com/magiconair/properties/tree/v1.4.1) - 13 Nov 2014
|
||||
|
||||
* [Issue #1](https://github.com/magiconair/properties/issues/1): Fixed bug in Keys() method which returned an empty string
|
||||
|
||||
### [1.4.0](https://github.com/magiconair/properties/tree/v1.4.0) - 23 Sep 2014
|
||||
|
||||
* Added [Keys()](http://godoc.org/github.com/magiconair/properties#Properties.Keys) to get the keys
|
||||
* Added [Filter()](http://godoc.org/github.com/magiconair/properties#Properties.Filter), [FilterRegexp()](http://godoc.org/github.com/magiconair/properties#Properties.FilterRegexp) and [FilterPrefix()](http://godoc.org/github.com/magiconair/properties#Properties.FilterPrefix) to get a subset of the properties
|
||||
|
||||
### [1.3.0](https://github.com/magiconair/properties/tree/v1.3.0) - 18 Mar 2014
|
||||
|
||||
* Added support for time.Duration
|
||||
* Made MustXXX() failure beha[ior configurable (log.Fatal, panic](https://github.com/magiconair/properties/tree/vior configurable (log.Fatal, panic) - custom)
|
||||
* Changed default of MustXXX() failure from panic to log.Fatal
|
||||
|
||||
### [1.2.0](https://github.com/magiconair/properties/tree/v1.2.0) - 05 Mar 2014
|
||||
|
||||
* Added MustGet... functions
|
||||
* Added support for int and uint with range checks on 32 bit platforms
|
||||
|
||||
### [1.1.0](https://github.com/magiconair/properties/tree/v1.1.0) - 20 Jan 2014
|
||||
|
||||
* Renamed from goproperties to properties
|
||||
* Added support for expansion of environment vars in
|
||||
filenames and value expressions
|
||||
* Fixed bug where value expressions were not at the
|
||||
start of the string
|
||||
|
||||
### [1.0.0](https://github.com/magiconair/properties/tree/v1.0.0) - 7 Jan 2014
|
||||
|
||||
* Initial release
|
30
vendor/github.com/magiconair/properties/README.md
generated
vendored
30
vendor/github.com/magiconair/properties/README.md
generated
vendored
|
@ -1,12 +1,9 @@
|
|||
[](https://github.com/magiconair/properties/releases)
|
||||
[](https://travis-ci.org/magiconair/properties)
|
||||
[](https://raw.githubusercontent.com/magiconair/properties/master/LICENSE)
|
||||
[](http://godoc.org/github.com/magiconair/properties)
|
||||
|
||||
# Overview
|
||||
|
||||
#### Please run `git pull --tags` to update the tags. See [below](#updated-git-tags) why.
|
||||
|
||||
properties is a Go library for reading and writing properties files.
|
||||
|
||||
It supports reading from multiple files or URLs and Spring style recursive
|
||||
|
@ -99,30 +96,3 @@ $ go get -u github.com/magiconair/properties
|
|||
## ToDo
|
||||
|
||||
* Dump contents with passwords and secrets obscured
|
||||
|
||||
## Updated Git tags
|
||||
|
||||
#### 13 Feb 2018
|
||||
|
||||
I realized that all of the git tags I had pushed before v1.7.5 were lightweight tags
|
||||
and I've only recently learned that this doesn't play well with `git describe` 😞
|
||||
|
||||
I have replaced all lightweight tags with signed tags using this script which should
|
||||
retain the commit date, name and email address. Please run `git pull --tags` to update them.
|
||||
|
||||
Worst case you have to reclone the repo.
|
||||
|
||||
```shell
|
||||
#!/bin/bash
|
||||
tag=$1
|
||||
echo "Updating $tag"
|
||||
date=$(git show ${tag}^0 --format=%aD | head -1)
|
||||
email=$(git show ${tag}^0 --format=%aE | head -1)
|
||||
name=$(git show ${tag}^0 --format=%aN | head -1)
|
||||
GIT_COMMITTER_DATE="$date" GIT_COMMITTER_NAME="$name" GIT_COMMITTER_EMAIL="$email" git tag -s -f ${tag} ${tag}^0 -m ${tag}
|
||||
```
|
||||
|
||||
I apologize for the inconvenience.
|
||||
|
||||
Frank
|
||||
|
||||
|
|
6
vendor/github.com/magiconair/properties/decode.go
generated
vendored
6
vendor/github.com/magiconair/properties/decode.go
generated
vendored
|
@ -189,12 +189,12 @@ func dec(p *Properties, key string, def *string, opts map[string]string, v refle
|
|||
for i := 0; i < v.NumField(); i++ {
|
||||
fv := v.Field(i)
|
||||
fk, def, opts := keydef(t.Field(i))
|
||||
if !fv.CanSet() {
|
||||
return fmt.Errorf("cannot set %s", t.Field(i).Name)
|
||||
}
|
||||
if fk == "-" {
|
||||
continue
|
||||
}
|
||||
if !fv.CanSet() {
|
||||
return fmt.Errorf("cannot set %s", t.Field(i).Name)
|
||||
}
|
||||
if key != "" {
|
||||
fk = key + "." + fk
|
||||
}
|
||||
|
|
27
vendor/github.com/magiconair/properties/load.go
generated
vendored
27
vendor/github.com/magiconair/properties/load.go
generated
vendored
|
@ -6,7 +6,7 @@ package properties
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
|
@ -52,6 +52,15 @@ func (l *Loader) LoadBytes(buf []byte) (*Properties, error) {
|
|||
return l.loadBytes(buf, l.Encoding)
|
||||
}
|
||||
|
||||
// LoadReader reads an io.Reader into a Properties struct.
|
||||
func (l *Loader) LoadReader(r io.Reader) (*Properties, error) {
|
||||
if buf, err := io.ReadAll(r); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
return l.loadBytes(buf, l.Encoding)
|
||||
}
|
||||
}
|
||||
|
||||
// LoadAll reads the content of multiple URLs or files in the given order into
|
||||
// a Properties struct. If IgnoreMissing is true then a 404 status code or
|
||||
// missing file will not be reported as error. Encoding sets the encoding for
|
||||
|
@ -91,7 +100,7 @@ func (l *Loader) LoadAll(names []string) (*Properties, error) {
|
|||
// If IgnoreMissing is true then a missing file will not be
|
||||
// reported as error.
|
||||
func (l *Loader) LoadFile(filename string) (*Properties, error) {
|
||||
data, err := ioutil.ReadFile(filename)
|
||||
data, err := os.ReadFile(filename)
|
||||
if err != nil {
|
||||
if l.IgnoreMissing && os.IsNotExist(err) {
|
||||
LogPrintf("properties: %s not found. skipping", filename)
|
||||
|
@ -126,7 +135,7 @@ func (l *Loader) LoadURL(url string) (*Properties, error) {
|
|||
return nil, fmt.Errorf("properties: %s returned %d", url, resp.StatusCode)
|
||||
}
|
||||
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("properties: %s error reading response. %s", url, err)
|
||||
}
|
||||
|
@ -185,6 +194,12 @@ func LoadFile(filename string, enc Encoding) (*Properties, error) {
|
|||
return l.LoadAll([]string{filename})
|
||||
}
|
||||
|
||||
// LoadReader reads an io.Reader into a Properties struct.
|
||||
func LoadReader(r io.Reader, enc Encoding) (*Properties, error) {
|
||||
l := &Loader{Encoding: enc}
|
||||
return l.LoadReader(r)
|
||||
}
|
||||
|
||||
// LoadFiles reads multiple files in the given order into
|
||||
// a Properties struct. If 'ignoreMissing' is true then
|
||||
// non-existent files will not be reported as error.
|
||||
|
@ -224,6 +239,12 @@ func MustLoadString(s string) *Properties {
|
|||
return must(LoadString(s))
|
||||
}
|
||||
|
||||
// MustLoadSReader reads an io.Reader into a Properties struct and
|
||||
// panics on error.
|
||||
func MustLoadReader(r io.Reader, enc Encoding) *Properties {
|
||||
return must(LoadReader(r, enc))
|
||||
}
|
||||
|
||||
// MustLoadFile reads a file into a Properties struct and
|
||||
// panics on error.
|
||||
func MustLoadFile(filename string, enc Encoding) *Properties {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue