diff --git a/Makefile b/Makefile index 1b3fa24b6..25a591c84 100644 --- a/Makefile +++ b/Makefile @@ -8,10 +8,12 @@ protos=$(shell find . -not -path './vendor/*' -name '*.proto') go_protos=$(protos:.proto=.pb.go) latest_tag=$(shell git tag --list --sort="-version:refname" | head -n 1) commits_since_latest_tag=$(shell git log --oneline $(latest_tag)..HEAD | wc -l) -GO_TEST_PACKAGES=$(shell go list ./... | grep -v /vendor/) +# /components/producers/golang-nancy/examples is ignored as it's an example of a vulnerable go.mod. +GO_TEST_PACKAGES=$(shell find . -path './components/producers/golang-nancy/examples' -prune -o -name 'go.mod' -exec dirname {} \; | sort -u) VENDOR_DIRS=$(shell find . -type d -name "vendor") NOT_VENDOR_PATHS := $(shell echo $(VENDOR_DIRS) | awk '{for (i=1; i<=NF; i++) print "-not -path \""$$i"/*\""}' | tr '\n' ' ') EXCLUDE_VENDOR_PATHS := $(shell echo $(VENDOR_DIRS) | awk '{for (i=1; i<=NF; i++) print "--exclude-path \""$$i"\""}' | tr '\n' ' ') +GO_TEST_OUT_DIR_PATH=$(shell pwd)/tests/output # Deployment vars # The following variables are used to define the deployment environment @@ -133,7 +135,13 @@ install-go-test-tools: go-tests: @mkdir -p tests/output - @gotestsum --junitfile tests/output/unit-tests.xml -- -race -coverprofile tests/output/cover.out $(GO_TEST_PACKAGES) + @for package in $(GO_TEST_PACKAGES); do \ + LISTED_PACKAGES=./...; \ + if [ "$$package" = "." ]; then \ + LISTED_PACKAGES=$$(go list ./... | grep -v "^$$package$$"); \ + fi; \ + (cd $$package && gotestsum --junitfile $(GO_TEST_OUT_DIR_PATH)/unit-tests.xml -- -race -coverprofile $(GO_TEST_OUT_DIR_PATH)/cover.out $$LISTED_PACKAGES) || exit 1; \ + done go-cover: go-tests @go tool cover -html=tests/output/cover.out -o=tests/output/cover.html && open tests/output/cover.html diff --git a/go.mod b/go.mod index 1f28460bc..8df5d8113 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ require ( cloud.google.com/go/bigquery v1.57.1 github.com/CycloneDX/cyclonedx-go v0.9.0 github.com/DependencyTrack/client-go v0.13.0 + github.com/abice/go-enum v0.6.0 github.com/andygrunwald/go-jira v1.16.0 github.com/avast/retry-go/v4 v4.3.3 github.com/aws/aws-sdk-go v1.17.7 @@ -60,7 +61,6 @@ require ( github.com/Microsoft/go-winio v0.6.2 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect - github.com/abice/go-enum v0.6.0 // indirect github.com/andybalholm/brotli v1.0.4 // indirect github.com/antlr4-go/antlr/v4 v4.13.0 // indirect github.com/apache/arrow/go/v12 v12.0.0 // indirect diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/Masterminds/goutils/cryptorandomstringutils.go b/new-components/enrichers/custom-annotation/vendor/github.com/Masterminds/goutils/cryptorandomstringutils.go index 8dbd92485..79ab47340 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/Masterminds/goutils/cryptorandomstringutils.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/Masterminds/goutils/cryptorandomstringutils.go @@ -29,9 +29,11 @@ CryptoRandomNonAlphaNumeric creates a random string whose length is the number o Characters will be chosen from the set of all characters (ASCII/Unicode values between 0 to 2,147,483,647 (math.MaxInt32)). Parameter: + count - the length of random string to create Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, CryptoRandom(...) */ @@ -44,9 +46,11 @@ CryptoRandomAscii creates a random string whose length is the number of characte Characters will be chosen from the set of characters whose ASCII value is between 32 and 126 (inclusive). Parameter: + count - the length of random string to create Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, CryptoRandom(...) */ @@ -59,9 +63,11 @@ CryptoRandomNumeric creates a random string whose length is the number of charac Characters will be chosen from the set of numeric characters. Parameter: + count - the length of random string to create Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, CryptoRandom(...) */ @@ -74,11 +80,13 @@ CryptoRandomAlphabetic creates a random string whose length is the number of cha Characters will be chosen from the set of alpha-numeric characters as indicated by the arguments. Parameters: + count - the length of random string to create letters - if true, generated string may include alphabetic characters numbers - if true, generated string may include numeric characters Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, CryptoRandom(...) */ @@ -91,9 +99,11 @@ CryptoRandomAlphaNumeric creates a random string whose length is the number of c Characters will be chosen from the set of alpha-numeric characters. Parameter: + count - the length of random string to create Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, CryptoRandom(...) */ @@ -106,11 +116,13 @@ CryptoRandomAlphaNumericCustom creates a random string whose length is the numbe Characters will be chosen from the set of alpha-numeric characters as indicated by the arguments. Parameters: + count - the length of random string to create letters - if true, generated string may include alphabetic characters numbers - if true, generated string may include numeric characters Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, CryptoRandom(...) */ @@ -125,6 +137,7 @@ unless letters and numbers are both false, in which case, start and end are set If chars is not nil, characters stored in chars that are between start and end are chosen. Parameters: + count - the length of random string to create start - the position in set of chars (ASCII/Unicode int) to start at end - the position in set of chars (ASCII/Unicode int) to end before @@ -133,6 +146,7 @@ Parameters: chars - the set of chars to choose randoms from. If nil, then it will use the set of all chars. Returns: + string - the random string error - an error stemming from invalid parameters: if count < 0; or the provided chars array is empty; or end <= start; or end > len(chars) */ diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/Masterminds/goutils/randomstringutils.go b/new-components/enrichers/custom-annotation/vendor/github.com/Masterminds/goutils/randomstringutils.go index 272670231..7ee8bc3f2 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/Masterminds/goutils/randomstringutils.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/Masterminds/goutils/randomstringutils.go @@ -32,9 +32,11 @@ RandomNonAlphaNumeric creates a random string whose length is the number of char Characters will be chosen from the set of all characters (ASCII/Unicode values between 0 to 2,147,483,647 (math.MaxInt32)). Parameter: + count - the length of random string to create Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, RandomSeed(...) */ @@ -47,9 +49,11 @@ RandomAscii creates a random string whose length is the number of characters spe Characters will be chosen from the set of characters whose ASCII value is between 32 and 126 (inclusive). Parameter: + count - the length of random string to create Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, RandomSeed(...) */ @@ -62,9 +66,11 @@ RandomNumeric creates a random string whose length is the number of characters s Characters will be chosen from the set of numeric characters. Parameter: + count - the length of random string to create Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, RandomSeed(...) */ @@ -77,9 +83,11 @@ RandomAlphabetic creates a random string whose length is the number of character Characters will be chosen from the set of alphabetic characters. Parameters: + count - the length of random string to create Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, RandomSeed(...) */ @@ -92,9 +100,11 @@ RandomAlphaNumeric creates a random string whose length is the number of charact Characters will be chosen from the set of alpha-numeric characters. Parameter: + count - the length of random string to create Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, RandomSeed(...) */ @@ -107,11 +117,13 @@ RandomAlphaNumericCustom creates a random string whose length is the number of c Characters will be chosen from the set of alpha-numeric characters as indicated by the arguments. Parameters: + count - the length of random string to create letters - if true, generated string may include alphabetic characters numbers - if true, generated string may include numeric characters Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, RandomSeed(...) */ @@ -125,6 +137,7 @@ This method has exactly the same semantics as RandomSeed(int, int, int, bool, bo instead of using an externally supplied source of randomness, it uses the internal *rand.Rand instance. Parameters: + count - the length of random string to create start - the position in set of chars (ASCII/Unicode int) to start at end - the position in set of chars (ASCII/Unicode int) to end before @@ -133,6 +146,7 @@ Parameters: chars - the set of chars to choose randoms from. If nil, then it will use the set of all chars. Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, RandomSeed(...) */ @@ -149,6 +163,7 @@ This method accepts a user-supplied *rand.Rand instance to use as a source of ra with a fixed seed and using it for each call, the same random sequence of strings can be generated repeatedly and predictably. Parameters: + count - the length of random string to create start - the position in set of chars (ASCII/Unicode decimals) to start at end - the position in set of chars (ASCII/Unicode decimals) to end before @@ -158,6 +173,7 @@ Parameters: random - a source of randomness. Returns: + string - the random string error - an error stemming from invalid parameters: if count < 0; or the provided chars array is empty; or end <= start; or end > len(chars) */ diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/Masterminds/goutils/stringutils.go b/new-components/enrichers/custom-annotation/vendor/github.com/Masterminds/goutils/stringutils.go index 741bb530e..3d47f09db 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/Masterminds/goutils/stringutils.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/Masterminds/goutils/stringutils.go @@ -31,18 +31,20 @@ Abbreviate abbreviates a string using ellipses. This will turn the string "Now Specifically, the algorithm is as follows: - - If str is less than maxWidth characters long, return it. - - Else abbreviate it to (str[0:maxWidth - 3] + "..."). - - If maxWidth is less than 4, return an illegal argument error. - - In no case will it return a string of length greater than maxWidth. + - If str is less than maxWidth characters long, return it. + - Else abbreviate it to (str[0:maxWidth - 3] + "..."). + - If maxWidth is less than 4, return an illegal argument error. + - In no case will it return a string of length greater than maxWidth. Parameters: - str - the string to check - maxWidth - maximum length of result string, must be at least 4 + + str - the string to check + maxWidth - maximum length of result string, must be at least 4 Returns: - string - abbreviated string - error - if the width is too small + + string - abbreviated string + error - if the width is too small */ func Abbreviate(str string, maxWidth int) (string, error) { return AbbreviateFull(str, 0, maxWidth) @@ -56,13 +58,15 @@ somewhere in the result. In no case will it return a string of length greater than maxWidth. Parameters: - str - the string to check - offset - left edge of source string - maxWidth - maximum length of result string, must be at least 4 + + str - the string to check + offset - left edge of source string + maxWidth - maximum length of result string, must be at least 4 Returns: - string - abbreviated string - error - if the width is too small + + string - abbreviated string + error - if the width is too small */ func AbbreviateFull(str string, offset int, maxWidth int) (string, error) { if str == "" { @@ -101,10 +105,12 @@ DeleteWhiteSpace deletes all whitespaces from a string as defined by unicode.IsS It returns the string without whitespaces. Parameter: - str - the string to delete whitespace from, may be nil + + str - the string to delete whitespace from, may be nil Returns: - the string without whitespaces + + the string without whitespaces */ func DeleteWhiteSpace(str string) string { if str == "" { @@ -130,11 +136,13 @@ func DeleteWhiteSpace(str string) string { IndexOfDifference compares two strings, and returns the index at which the strings begin to differ. Parameters: - str1 - the first string - str2 - the second string + + str1 - the first string + str2 - the second string Returns: - the index where str1 and str2 begin to differ; -1 if they are equal + + the index where str1 and str2 begin to differ; -1 if they are equal */ func IndexOfDifference(str1 string, str2 string) int { if str1 == str2 { @@ -158,16 +166,18 @@ func IndexOfDifference(str1 string, str2 string) int { /* IsBlank checks if a string is whitespace or empty (""). Observe the following behavior: - goutils.IsBlank("") = true - goutils.IsBlank(" ") = true - goutils.IsBlank("bob") = false - goutils.IsBlank(" bob ") = false + goutils.IsBlank("") = true + goutils.IsBlank(" ") = true + goutils.IsBlank("bob") = false + goutils.IsBlank(" bob ") = false Parameter: - str - the string to check + + str - the string to check Returns: - true - if the string is whitespace or empty ("") + + true - if the string is whitespace or empty ("") */ func IsBlank(str string) bool { strLen := len(str) @@ -190,12 +200,14 @@ An empty string ("") will return -1 (INDEX_NOT_FOUND). A negative start position A start position greater than the string length returns -1. Parameters: - str - the string to check - sub - the substring to find - start - the start position; negative treated as zero + + str - the string to check + sub - the substring to find + start - the start position; negative treated as zero Returns: - the first index where the sub string was found (always >= start) + + the first index where the sub string was found (always >= start) */ func IndexOf(str string, sub string, start int) int { diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/Masterminds/goutils/wordutils.go b/new-components/enrichers/custom-annotation/vendor/github.com/Masterminds/goutils/wordutils.go index 034cad8e2..8e9ee337a 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/Masterminds/goutils/wordutils.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/Masterminds/goutils/wordutils.go @@ -21,29 +21,29 @@ errors while others do not, so usage would vary as a result. Example: - package main + package main - import ( - "fmt" - "github.com/aokoli/goutils" - ) + import ( + "fmt" + "github.com/aokoli/goutils" + ) - func main() { + func main() { - // EXAMPLE 1: A goutils function which returns no errors - fmt.Println (goutils.Initials("John Doe Foo")) // Prints out "JDF" + // EXAMPLE 1: A goutils function which returns no errors + fmt.Println (goutils.Initials("John Doe Foo")) // Prints out "JDF" - // EXAMPLE 2: A goutils function which returns an error - rand1, err1 := goutils.Random (-1, 0, 0, true, true) + // EXAMPLE 2: A goutils function which returns an error + rand1, err1 := goutils.Random (-1, 0, 0, true, true) - if err1 != nil { - fmt.Println(err1) // Prints out error message because -1 was entered as the first parameter in goutils.Random(...) - } else { - fmt.Println(rand1) - } - } + if err1 != nil { + fmt.Println(err1) // Prints out error message because -1 was entered as the first parameter in goutils.Random(...) + } else { + fmt.Println(rand1) + } + } */ package goutils @@ -62,11 +62,13 @@ New lines will be separated by '\n'. Very long words, such as URLs will not be w Leading spaces on a new line are stripped. Trailing spaces are not stripped. Parameters: - str - the string to be word wrapped - wrapLength - the column (a column can fit only one character) to wrap the words at, less than 1 is treated as 1 + + str - the string to be word wrapped + wrapLength - the column (a column can fit only one character) to wrap the words at, less than 1 is treated as 1 Returns: - a line with newlines inserted + + a line with newlines inserted */ func Wrap(str string, wrapLength int) string { return WrapCustom(str, wrapLength, "", false) @@ -77,13 +79,15 @@ WrapCustom wraps a single line of text, identifying words by ' '. Leading spaces on a new line are stripped. Trailing spaces are not stripped. Parameters: - str - the string to be word wrapped - wrapLength - the column number (a column can fit only one character) to wrap the words at, less than 1 is treated as 1 - newLineStr - the string to insert for a new line, "" uses '\n' - wrapLongWords - true if long words (such as URLs) should be wrapped + + str - the string to be word wrapped + wrapLength - the column number (a column can fit only one character) to wrap the words at, less than 1 is treated as 1 + newLineStr - the string to insert for a new line, "" uses '\n' + wrapLongWords - true if long words (such as URLs) should be wrapped Returns: - a line with newlines inserted + + a line with newlines inserted */ func WrapCustom(str string, wrapLength int, newLineStr string, wrapLongWords bool) string { @@ -157,11 +161,13 @@ and the first non-delimiter character after a delimiter will be capitalized. A " Capitalization uses the Unicode title case, normally equivalent to upper case. Parameters: - str - the string to capitalize - delimiters - set of characters to determine capitalization, exclusion of this parameter means whitespace would be delimeter + + str - the string to capitalize + delimiters - set of characters to determine capitalization, exclusion of this parameter means whitespace would be delimeter Returns: - capitalized string + + capitalized string */ func Capitalize(str string, delimiters ...rune) string { @@ -199,11 +205,13 @@ to separate words. The first string character and the first non-delimiter charac Capitalization uses the Unicode title case, normally equivalent to upper case. Parameters: - str - the string to capitalize fully - delimiters - set of characters to determine capitalization, exclusion of this parameter means whitespace would be delimeter + + str - the string to capitalize fully + delimiters - set of characters to determine capitalization, exclusion of this parameter means whitespace would be delimeter Returns: - capitalized string + + capitalized string */ func CapitalizeFully(str string, delimiters ...rune) string { @@ -228,11 +236,13 @@ The delimiters represent a set of characters understood to separate words. The f character after a delimiter will be uncapitalized. Whitespace is defined by unicode.IsSpace(char). Parameters: - str - the string to uncapitalize fully - delimiters - set of characters to determine capitalization, exclusion of this parameter means whitespace would be delimeter + + str - the string to uncapitalize fully + delimiters - set of characters to determine capitalization, exclusion of this parameter means whitespace would be delimeter Returns: - uncapitalized string + + uncapitalized string */ func Uncapitalize(str string, delimiters ...rune) string { @@ -267,17 +277,19 @@ SwapCase swaps the case of a string using a word based algorithm. Conversion algorithm: - Upper case character converts to Lower case - Title case character converts to Lower case - Lower case character after Whitespace or at start converts to Title case - Other Lower case character converts to Upper case - Whitespace is defined by unicode.IsSpace(char). + Upper case character converts to Lower case + Title case character converts to Lower case + Lower case character after Whitespace or at start converts to Title case + Other Lower case character converts to Upper case + Whitespace is defined by unicode.IsSpace(char). Parameters: - str - the string to swap case + + str - the string to swap case Returns: - the changed string + + the changed string */ func SwapCase(str string) string { if str == "" { @@ -315,10 +327,13 @@ letters after the defined delimiters are returned as a new string. Their case is parameter is excluded, then Whitespace is used. Whitespace is defined by unicode.IsSpacea(char). An empty delimiter array returns an empty string. Parameters: - str - the string to get initials from - delimiters - set of characters to determine words, exclusion of this parameter means whitespace would be delimeter + + str - the string to get initials from + delimiters - set of characters to determine words, exclusion of this parameter means whitespace would be delimeter + Returns: - string of initial letters + + string of initial letters */ func Initials(str string, delimiters ...rune) string { if str == "" { diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/Masterminds/sprig/v3/numeric.go b/new-components/enrichers/custom-annotation/vendor/github.com/Masterminds/sprig/v3/numeric.go index f68e4182e..84fe18de0 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/Masterminds/sprig/v3/numeric.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/Masterminds/sprig/v3/numeric.go @@ -6,8 +6,8 @@ import ( "strconv" "strings" - "github.com/spf13/cast" "github.com/shopspring/decimal" + "github.com/spf13/cast" ) // toFloat64 converts 64-bit floats diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/bmatcuk/doublestar/doublestar.go b/new-components/enrichers/custom-annotation/vendor/github.com/bmatcuk/doublestar/doublestar.go index 206e01202..1edce3c55 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/bmatcuk/doublestar/doublestar.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/bmatcuk/doublestar/doublestar.go @@ -192,23 +192,23 @@ func isZeroLengthPattern(pattern string) (ret bool, err error) { // Match returns true if name matches the shell file name pattern. // The pattern syntax is: // -// pattern: -// { term } -// term: -// '*' matches any sequence of non-path-separators -// '**' matches any sequence of characters, including -// path separators. -// '?' matches any single non-path-separator character -// '[' [ '^' ] { character-range } ']' -// character class (must be non-empty) -// '{' { term } [ ',' { term } ... ] '}' -// c matches character c (c != '*', '?', '\\', '[') -// '\\' c matches character c +// pattern: +// { term } +// term: +// '*' matches any sequence of non-path-separators +// '**' matches any sequence of characters, including +// path separators. +// '?' matches any single non-path-separator character +// '[' [ '^' ] { character-range } ']' +// character class (must be non-empty) +// '{' { term } [ ',' { term } ... ] '}' +// c matches character c (c != '*', '?', '\\', '[') +// '\\' c matches character c // -// character-range: -// c matches character c (c != '\\', '-', ']') -// '\\' c matches character c -// lo '-' hi matches character c for lo <= c <= hi +// character-range: +// c matches character c (c != '\\', '-', ']') +// '\\' c matches character c +// lo '-' hi matches character c for lo <= c <= hi // // Match requires pattern to match all of name, not just a substring. // The path-separator defaults to the '/' character. The only possible @@ -218,7 +218,6 @@ func isZeroLengthPattern(pattern string) (ret bool, err error) { // always uses '/' as the path separator. If you want to support systems // which use a different path separator (such as Windows), what you want // is the PathMatch() function below. -// func Match(pattern, name string) (bool, error) { return matchWithSeparator(pattern, name, '/') } @@ -229,7 +228,6 @@ func Match(pattern, name string) (bool, error) { // disabled. // // Note: this is meant as a drop-in replacement for filepath.Match(). -// func PathMatch(pattern, name string) (bool, error) { return PathMatchOS(StandardOS, pattern, name) } @@ -243,28 +241,27 @@ func PathMatchOS(vos OS, pattern, name string) (bool, error) { // Match returns true if name matches the shell file name pattern. // The pattern syntax is: // -// pattern: -// { term } -// term: -// '*' matches any sequence of non-path-separators -// '**' matches any sequence of characters, including -// path separators. -// '?' matches any single non-path-separator character -// '[' [ '^' ] { character-range } ']' -// character class (must be non-empty) -// '{' { term } [ ',' { term } ... ] '}' -// c matches character c (c != '*', '?', '\\', '[') -// '\\' c matches character c +// pattern: +// { term } +// term: +// '*' matches any sequence of non-path-separators +// '**' matches any sequence of characters, including +// path separators. +// '?' matches any single non-path-separator character +// '[' [ '^' ] { character-range } ']' +// character class (must be non-empty) +// '{' { term } [ ',' { term } ... ] '}' +// c matches character c (c != '*', '?', '\\', '[') +// '\\' c matches character c // -// character-range: -// c matches character c (c != '\\', '-', ']') -// '\\' c matches character c, unless separator is '\\' -// lo '-' hi matches character c for lo <= c <= hi +// character-range: +// c matches character c (c != '\\', '-', ']') +// '\\' c matches character c, unless separator is '\\' +// lo '-' hi matches character c for lo <= c <= hi // // Match requires pattern to match all of name, not just a substring. // The only possible returned error is ErrBadPattern, when pattern // is malformed. -// func matchWithSeparator(pattern, name string, separator rune) (bool, error) { nameComponents := splitPathOnSeparator(name, separator) return doMatching(pattern, nameComponents) @@ -340,7 +337,6 @@ func doMatching(pattern string, nameComponents []string) (matched bool, err erro // disabled. // // Note: this is meant as a drop-in replacement for filepath.Glob(). -// func Glob(pattern string) (matches []string, err error) { return GlobOS(StandardOS, pattern) } diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/davecgh/go-spew/spew/bypass.go b/new-components/enrichers/custom-annotation/vendor/github.com/davecgh/go-spew/spew/bypass.go index 792994785..70ddeaad3 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/davecgh/go-spew/spew/bypass.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/davecgh/go-spew/spew/bypass.go @@ -18,6 +18,7 @@ // tag is deprecated and thus should not be used. // Go versions prior to 1.4 are disabled because they use a different layout // for interfaces which make the implementation of unsafeReflectValue more complex. +//go:build !js && !appengine && !safe && !disableunsafe && go1.4 // +build !js,!appengine,!safe,!disableunsafe,go1.4 package spew diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go b/new-components/enrichers/custom-annotation/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go index 205c28d68..5e2d890d6 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go @@ -16,6 +16,7 @@ // when the code is running on Google App Engine, compiled by GopherJS, or // "-tags safe" is added to the go build command line. The "disableunsafe" // tag is deprecated and thus should not be used. +//go:build js || appengine || safe || disableunsafe || !go1.4 // +build js appengine safe disableunsafe !go1.4 package spew diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/davecgh/go-spew/spew/config.go b/new-components/enrichers/custom-annotation/vendor/github.com/davecgh/go-spew/spew/config.go index 2e3d22f31..161895fc6 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/davecgh/go-spew/spew/config.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/davecgh/go-spew/spew/config.go @@ -254,15 +254,15 @@ pointer addresses used to indirect to the final value. It provides the following features over the built-in printing facilities provided by the fmt package: - * Pointers are dereferenced and followed - * Circular data structures are detected and handled properly - * Custom Stringer/error interfaces are optionally invoked, including - on unexported types - * Custom types which only implement the Stringer/error interfaces via - a pointer receiver are optionally invoked when passing non-pointer - variables - * Byte arrays and slices are dumped like the hexdump -C command which - includes offsets, byte values in hex, and ASCII output + - Pointers are dereferenced and followed + - Circular data structures are detected and handled properly + - Custom Stringer/error interfaces are optionally invoked, including + on unexported types + - Custom types which only implement the Stringer/error interfaces via + a pointer receiver are optionally invoked when passing non-pointer + variables + - Byte arrays and slices are dumped like the hexdump -C command which + includes offsets, byte values in hex, and ASCII output The configuration options are controlled by modifying the public members of c. See ConfigState for options documentation. @@ -295,12 +295,12 @@ func (c *ConfigState) convertArgs(args []interface{}) (formatters []interface{}) // NewDefaultConfig returns a ConfigState with the following default settings. // -// Indent: " " -// MaxDepth: 0 -// DisableMethods: false -// DisablePointerMethods: false -// ContinueOnMethod: false -// SortKeys: false +// Indent: " " +// MaxDepth: 0 +// DisableMethods: false +// DisablePointerMethods: false +// ContinueOnMethod: false +// SortKeys: false func NewDefaultConfig() *ConfigState { return &ConfigState{Indent: " "} } diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/davecgh/go-spew/spew/doc.go b/new-components/enrichers/custom-annotation/vendor/github.com/davecgh/go-spew/spew/doc.go index aacaac6f1..722e9aa79 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/davecgh/go-spew/spew/doc.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/davecgh/go-spew/spew/doc.go @@ -21,35 +21,36 @@ debugging. A quick overview of the additional features spew provides over the built-in printing facilities for Go data types are as follows: - * Pointers are dereferenced and followed - * Circular data structures are detected and handled properly - * Custom Stringer/error interfaces are optionally invoked, including - on unexported types - * Custom types which only implement the Stringer/error interfaces via - a pointer receiver are optionally invoked when passing non-pointer - variables - * Byte arrays and slices are dumped like the hexdump -C command which - includes offsets, byte values in hex, and ASCII output (only when using - Dump style) + - Pointers are dereferenced and followed + - Circular data structures are detected and handled properly + - Custom Stringer/error interfaces are optionally invoked, including + on unexported types + - Custom types which only implement the Stringer/error interfaces via + a pointer receiver are optionally invoked when passing non-pointer + variables + - Byte arrays and slices are dumped like the hexdump -C command which + includes offsets, byte values in hex, and ASCII output (only when using + Dump style) There are two different approaches spew allows for dumping Go data structures: - * Dump style which prints with newlines, customizable indentation, - and additional debug information such as types and all pointer addresses - used to indirect to the final value - * A custom Formatter interface that integrates cleanly with the standard fmt - package and replaces %v, %+v, %#v, and %#+v to provide inline printing - similar to the default %v while providing the additional functionality - outlined above and passing unsupported format verbs such as %x and %q - along to fmt + - Dump style which prints with newlines, customizable indentation, + and additional debug information such as types and all pointer addresses + used to indirect to the final value + - A custom Formatter interface that integrates cleanly with the standard fmt + package and replaces %v, %+v, %#v, and %#+v to provide inline printing + similar to the default %v while providing the additional functionality + outlined above and passing unsupported format verbs such as %x and %q + along to fmt -Quick Start +# Quick Start This section demonstrates how to quickly get started with spew. See the sections below for further details on formatting and configuration options. To dump a variable with full newlines, indentation, type, and pointer information use Dump, Fdump, or Sdump: + spew.Dump(myVar1, myVar2, ...) spew.Fdump(someWriter, myVar1, myVar2, ...) str := spew.Sdump(myVar1, myVar2, ...) @@ -58,12 +59,13 @@ Alternatively, if you would prefer to use format strings with a compacted inline printing style, use the convenience wrappers Printf, Fprintf, etc with %v (most compact), %+v (adds pointer addresses), %#v (adds types), or %#+v (adds types and pointer addresses): + spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2) spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2) spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) -Configuration Options +# Configuration Options Configuration of spew is handled by fields in the ConfigState type. For convenience, all of the top-level functions use a global state available @@ -74,51 +76,52 @@ equivalent to the top-level functions. This allows concurrent configuration options. See the ConfigState documentation for more details. The following configuration options are available: - * Indent - String to use for each indentation level for Dump functions. - It is a single space by default. A popular alternative is "\t". - - * MaxDepth - Maximum number of levels to descend into nested data structures. - There is no limit by default. - - * DisableMethods - Disables invocation of error and Stringer interface methods. - Method invocation is enabled by default. - - * DisablePointerMethods - Disables invocation of error and Stringer interface methods on types - which only accept pointer receivers from non-pointer variables. - Pointer method invocation is enabled by default. - - * DisablePointerAddresses - DisablePointerAddresses specifies whether to disable the printing of - pointer addresses. This is useful when diffing data structures in tests. - - * DisableCapacities - DisableCapacities specifies whether to disable the printing of - capacities for arrays, slices, maps and channels. This is useful when - diffing data structures in tests. - - * ContinueOnMethod - Enables recursion into types after invoking error and Stringer interface - methods. Recursion after method invocation is disabled by default. - - * SortKeys - Specifies map keys should be sorted before being printed. Use - this to have a more deterministic, diffable output. Note that - only native types (bool, int, uint, floats, uintptr and string) - and types which implement error or Stringer interfaces are - supported with other types sorted according to the - reflect.Value.String() output which guarantees display - stability. Natural map order is used by default. - - * SpewKeys - Specifies that, as a last resort attempt, map keys should be - spewed to strings and sorted by those strings. This is only - considered if SortKeys is true. - -Dump Usage + + - Indent + String to use for each indentation level for Dump functions. + It is a single space by default. A popular alternative is "\t". + + - MaxDepth + Maximum number of levels to descend into nested data structures. + There is no limit by default. + + - DisableMethods + Disables invocation of error and Stringer interface methods. + Method invocation is enabled by default. + + - DisablePointerMethods + Disables invocation of error and Stringer interface methods on types + which only accept pointer receivers from non-pointer variables. + Pointer method invocation is enabled by default. + + - DisablePointerAddresses + DisablePointerAddresses specifies whether to disable the printing of + pointer addresses. This is useful when diffing data structures in tests. + + - DisableCapacities + DisableCapacities specifies whether to disable the printing of + capacities for arrays, slices, maps and channels. This is useful when + diffing data structures in tests. + + - ContinueOnMethod + Enables recursion into types after invoking error and Stringer interface + methods. Recursion after method invocation is disabled by default. + + - SortKeys + Specifies map keys should be sorted before being printed. Use + this to have a more deterministic, diffable output. Note that + only native types (bool, int, uint, floats, uintptr and string) + and types which implement error or Stringer interfaces are + supported with other types sorted according to the + reflect.Value.String() output which guarantees display + stability. Natural map order is used by default. + + - SpewKeys + Specifies that, as a last resort attempt, map keys should be + spewed to strings and sorted by those strings. This is only + considered if SortKeys is true. + +# Dump Usage Simply call spew.Dump with a list of variables you want to dump: @@ -133,7 +136,7 @@ A third option is to call spew.Sdump to get the formatted output as a string: str := spew.Sdump(myVar1, myVar2, ...) -Sample Dump Output +# Sample Dump Output See the Dump example for details on the setup of the types and variables being shown here. @@ -150,13 +153,14 @@ shown here. Byte (and uint8) arrays and slices are displayed uniquely like the hexdump -C command as shown. + ([]uint8) (len=32 cap=32) { 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... | 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0| 00000020 31 32 |12| } -Custom Formatter +# Custom Formatter Spew provides a custom formatter that implements the fmt.Formatter interface so that it integrates cleanly with standard fmt package printing functions. The @@ -170,7 +174,7 @@ standard fmt package for formatting. In addition, the custom formatter ignores the width and precision arguments (however they will still work on the format specifiers not handled by the custom formatter). -Custom Formatter Usage +# Custom Formatter Usage The simplest way to make use of the spew custom formatter is to call one of the convenience functions such as spew.Printf, spew.Println, or spew.Printf. The @@ -184,15 +188,17 @@ functions have syntax you are most likely already familiar with: See the Index for the full list convenience functions. -Sample Formatter Output +# Sample Formatter Output Double pointer to a uint8: + %v: <**>5 %+v: <**>(0xf8400420d0->0xf8400420c8)5 %#v: (**uint8)5 %#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5 Pointer to circular struct with a uint8 field and a pointer to itself: + %v: <*>{1 <*>} %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)} %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)} @@ -201,7 +207,7 @@ Pointer to circular struct with a uint8 field and a pointer to itself: See the Printf example for details on the setup of variables being shown here. -Errors +# Errors Since it is possible for custom Stringer/error interfaces to panic, spew detects them and handles them internally by printing the panic information diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/davecgh/go-spew/spew/dump.go b/new-components/enrichers/custom-annotation/vendor/github.com/davecgh/go-spew/spew/dump.go index f78d89fc1..8323041a4 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/davecgh/go-spew/spew/dump.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/davecgh/go-spew/spew/dump.go @@ -488,15 +488,15 @@ pointer addresses used to indirect to the final value. It provides the following features over the built-in printing facilities provided by the fmt package: - * Pointers are dereferenced and followed - * Circular data structures are detected and handled properly - * Custom Stringer/error interfaces are optionally invoked, including - on unexported types - * Custom types which only implement the Stringer/error interfaces via - a pointer receiver are optionally invoked when passing non-pointer - variables - * Byte arrays and slices are dumped like the hexdump -C command which - includes offsets, byte values in hex, and ASCII output + - Pointers are dereferenced and followed + - Circular data structures are detected and handled properly + - Custom Stringer/error interfaces are optionally invoked, including + on unexported types + - Custom types which only implement the Stringer/error interfaces via + a pointer receiver are optionally invoked when passing non-pointer + variables + - Byte arrays and slices are dumped like the hexdump -C command which + includes offsets, byte values in hex, and ASCII output The configuration options are controlled by an exported package global, spew.Config. See ConfigState for options documentation. diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/go-errors/errors/error.go b/new-components/enrichers/custom-annotation/vendor/github.com/go-errors/errors/error.go index ccbc2e427..533f1bb26 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/go-errors/errors/error.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/go-errors/errors/error.go @@ -9,36 +9,36 @@ // // For example: // -// package crashy +// package crashy // -// import "github.com/go-errors/errors" +// import "github.com/go-errors/errors" // -// var Crashed = errors.Errorf("oh dear") +// var Crashed = errors.Errorf("oh dear") // -// func Crash() error { -// return errors.New(Crashed) -// } +// func Crash() error { +// return errors.New(Crashed) +// } // // This can be called as follows: // -// package main +// package main // -// import ( -// "crashy" -// "fmt" -// "github.com/go-errors/errors" -// ) +// import ( +// "crashy" +// "fmt" +// "github.com/go-errors/errors" +// ) // -// func main() { -// err := crashy.Crash() -// if err != nil { -// if errors.Is(err, crashy.Crashed) { -// fmt.Println(err.(*errors.Error).ErrorStack()) -// } else { -// panic(err) -// } -// } -// } +// func main() { +// err := crashy.Crash() +// if err != nil { +// if errors.Is(err, crashy.Crashed) { +// fmt.Println(err.(*errors.Error).ErrorStack()) +// } else { +// panic(err) +// } +// } +// } // // This package was original written to allow reporting to Bugsnag, // but after I found similar packages by Facebook and Dropbox, it diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/go-errors/errors/parse_panic.go b/new-components/enrichers/custom-annotation/vendor/github.com/go-errors/errors/parse_panic.go index cc37052d7..d295563df 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/go-errors/errors/parse_panic.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/go-errors/errors/parse_panic.go @@ -75,8 +75,8 @@ func ParsePanic(text string) (*Error, error) { // The lines we're passing look like this: // -// main.(*foo).destruct(0xc208067e98) -// /0/go/src/github.com/bugsnag/bugsnag-go/pan/main.go:22 +0x151 +// main.(*foo).destruct(0xc208067e98) +// /0/go/src/github.com/bugsnag/bugsnag-go/pan/main.go:22 +0x151 func parsePanicFrame(name string, line string, createdBy bool) (*StackFrame, error) { idx := strings.LastIndex(name, "(") if idx == -1 && !createdBy { diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/golang/mock/mockgen/version.1.11.go b/new-components/enrichers/custom-annotation/vendor/github.com/golang/mock/mockgen/version.1.11.go index e6b25db23..cacf87933 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/golang/mock/mockgen/version.1.11.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/golang/mock/mockgen/version.1.11.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build !go1.12 // +build !go1.12 package main diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/golang/mock/mockgen/version.1.12.go b/new-components/enrichers/custom-annotation/vendor/github.com/golang/mock/mockgen/version.1.12.go index ad121ae63..a5e9e454f 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/golang/mock/mockgen/version.1.12.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/golang/mock/mockgen/version.1.12.go @@ -13,6 +13,7 @@ // limitations under the License. // +//go:build go1.12 // +build go1.12 package main diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/dce.go b/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/dce.go index fa820b9d3..9302a1c1b 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/dce.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/dce.go @@ -42,7 +42,7 @@ func NewDCESecurity(domain Domain, id uint32) (UUID, error) { // NewDCEPerson returns a DCE Security (Version 2) UUID in the person // domain with the id returned by os.Getuid. // -// NewDCESecurity(Person, uint32(os.Getuid())) +// NewDCESecurity(Person, uint32(os.Getuid())) func NewDCEPerson() (UUID, error) { return NewDCESecurity(Person, uint32(os.Getuid())) } @@ -50,7 +50,7 @@ func NewDCEPerson() (UUID, error) { // NewDCEGroup returns a DCE Security (Version 2) UUID in the group // domain with the id returned by os.Getgid. // -// NewDCESecurity(Group, uint32(os.Getgid())) +// NewDCESecurity(Group, uint32(os.Getgid())) func NewDCEGroup() (UUID, error) { return NewDCESecurity(Group, uint32(os.Getgid())) } diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/hash.go b/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/hash.go index dc60082d3..cee37578b 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/hash.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/hash.go @@ -45,7 +45,7 @@ func NewHash(h hash.Hash, space UUID, data []byte, version int) UUID { // NewMD5 returns a new MD5 (Version 3) UUID based on the // supplied name space and data. It is the same as calling: // -// NewHash(md5.New(), space, data, 3) +// NewHash(md5.New(), space, data, 3) func NewMD5(space UUID, data []byte) UUID { return NewHash(md5.New(), space, data, 3) } @@ -53,7 +53,7 @@ func NewMD5(space UUID, data []byte) UUID { // NewSHA1 returns a new SHA1 (Version 5) UUID based on the // supplied name space and data. It is the same as calling: // -// NewHash(sha1.New(), space, data, 5) +// NewHash(sha1.New(), space, data, 5) func NewSHA1(space UUID, data []byte) UUID { return NewHash(sha1.New(), space, data, 5) } diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/node_js.go b/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/node_js.go index b2a0bc871..f745d7017 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/node_js.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/node_js.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build js // +build js package uuid diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/node_net.go b/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/node_net.go index 0cbbcddbd..e91358f7d 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/node_net.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/node_net.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !js // +build !js package uuid diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/null.go b/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/null.go index d7fcbf286..06ecf9de2 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/null.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/null.go @@ -17,15 +17,14 @@ var jsonNull = []byte("null") // NullUUID implements the SQL driver.Scanner interface so // it can be used as a scan destination: // -// var u uuid.NullUUID -// err := db.QueryRow("SELECT name FROM foo WHERE id=?", id).Scan(&u) -// ... -// if u.Valid { -// // use u.UUID -// } else { -// // NULL value -// } -// +// var u uuid.NullUUID +// err := db.QueryRow("SELECT name FROM foo WHERE id=?", id).Scan(&u) +// ... +// if u.Valid { +// // use u.UUID +// } else { +// // NULL value +// } type NullUUID struct { UUID UUID Valid bool // Valid is true if UUID is not NULL diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/uuid.go b/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/uuid.go index 5232b4867..1051192bc 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/uuid.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/uuid.go @@ -187,10 +187,12 @@ func Must(uuid UUID, err error) UUID { } // Validate returns an error if s is not a properly formatted UUID in one of the following formats: -// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} +// +// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx +// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx +// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} +// // It returns an error if the format is invalid, otherwise nil. func Validate(s string) error { switch len(s) { diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/version4.go b/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/version4.go index 7697802e4..62ac27381 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/version4.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/google/uuid/version4.go @@ -9,7 +9,7 @@ import "io" // New creates a new random UUID or panics. New is equivalent to // the expression // -// uuid.Must(uuid.NewRandom()) +// uuid.Must(uuid.NewRandom()) func New() UUID { return Must(NewRandom()) } @@ -17,7 +17,7 @@ func New() UUID { // NewString creates a new random UUID and returns it as a string or panics. // NewString is equivalent to the expression // -// uuid.New().String() +// uuid.New().String() func NewString() string { return Must(NewRandom()).String() } @@ -31,11 +31,11 @@ func NewString() string { // // A note about uniqueness derived from the UUID Wikipedia entry: // -// Randomly generated UUIDs have 122 random bits. One's annual risk of being -// hit by a meteorite is estimated to be one chance in 17 billion, that -// means the probability is about 0.00000000006 (6 × 10−11), -// equivalent to the odds of creating a few tens of trillions of UUIDs in a -// year and having one duplicate. +// Randomly generated UUIDs have 122 random bits. One's annual risk of being +// hit by a meteorite is estimated to be one chance in 17 billion, that +// means the probability is about 0.00000000006 (6 × 10−11), +// equivalent to the odds of creating a few tens of trillions of UUIDs in a +// year and having one duplicate. func NewRandom() (UUID, error) { if !poolEnabled { return NewRandomFromReader(rander) diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/diagnostic.go b/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/diagnostic.go index 578f81a2c..c84225af1 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/diagnostic.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/diagnostic.go @@ -121,7 +121,7 @@ func (d Diagnostics) Error() string { // This is provided as a convenience for returning from a function that // collects and then returns a set of diagnostics: // -// return nil, diags.Append(&hcl.Diagnostic{ ... }) +// return nil, diags.Append(&hcl.Diagnostic{ ... }) // // Note that this modifies the array underlying the diagnostics slice, so // must be used carefully within a single codepath. It is incorrect (and rude) diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/doc.go b/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/doc.go index a0e3119f2..665ad6cad 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/doc.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/doc.go @@ -9,25 +9,25 @@ // configurations in either native HCL syntax or JSON syntax into a Go struct // type: // -// package main +// package main // -// import ( -// "log" -// "github.com/hashicorp/hcl/v2/hclsimple" -// ) +// import ( +// "log" +// "github.com/hashicorp/hcl/v2/hclsimple" +// ) // -// type Config struct { -// LogLevel string `hcl:"log_level"` -// } +// type Config struct { +// LogLevel string `hcl:"log_level"` +// } // -// func main() { -// var config Config -// err := hclsimple.DecodeFile("config.hcl", nil, &config) -// if err != nil { -// log.Fatalf("Failed to load configuration: %s", err) -// } -// log.Printf("Configuration is %#v", config) -// } +// func main() { +// var config Config +// err := hclsimple.DecodeFile("config.hcl", nil, &config) +// if err != nil { +// log.Fatalf("Failed to load configuration: %s", err) +// } +// log.Printf("Configuration is %#v", config) +// } // // If your application needs more control over the evaluation of the // configuration, you can use the functions in the subdirectories hclparse, diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/gohcl/doc.go b/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/gohcl/doc.go index cfec2530c..5e103a6a4 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/gohcl/doc.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/gohcl/doc.go @@ -10,18 +10,18 @@ // A struct field tag scheme is used, similar to other decoding and // unmarshalling libraries. The tags are formatted as in the following example: // -// ThingType string `hcl:"thing_type,attr"` +// ThingType string `hcl:"thing_type,attr"` // // Within each tag there are two comma-separated tokens. The first is the // name of the corresponding construct in configuration, while the second // is a keyword giving the kind of construct expected. The following // kind keywords are supported: // -// attr (the default) indicates that the value is to be populated from an attribute -// block indicates that the value is to populated from a block -// label indicates that the value is to populated from a block label -// optional is the same as attr, but the field is optional -// remain indicates that the value is to be populated from the remaining body after populating other fields +// attr (the default) indicates that the value is to be populated from an attribute +// block indicates that the value is to populated from a block +// label indicates that the value is to populated from a block label +// optional is the same as attr, but the field is optional +// remain indicates that the value is to be populated from the remaining body after populating other fields // // "attr" fields may either be of type *hcl.Expression, in which case the raw // expression is assigned, or of any type accepted by gocty, in which case diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression.go b/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression.go index 5ed352739..6c7b7c678 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression.go @@ -1244,9 +1244,9 @@ func (e *ObjectConsKeyExpr) UnwrapExpression() Expression { // ForExpr represents iteration constructs: // -// tuple = [for i, v in list: upper(v) if i > 2] -// object = {for k, v in map: k => upper(v)} -// object_of_tuples = {for v in list: v.key: v...} +// tuple = [for i, v in list: upper(v) if i > 2] +// object = {for k, v in map: k => upper(v)} +// object_of_tuples = {for v in list: v.key: v...} type ForExpr struct { KeyVar string // empty if ignoring the key ValVar string diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/hclwrite/format.go b/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/hclwrite/format.go index d5f974c39..5e326b08a 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/hclwrite/format.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/hclwrite/format.go @@ -452,9 +452,12 @@ func tokenBracketChange(tok *Token) int { // // lead: always present, representing everything up to one of the others // assign: if line contains an attribute assignment, represents the tokens -// starting at (and including) the equals symbol +// +// starting at (and including) the equals symbol +// // comment: if line contains any non-comment tokens and ends with a -// single-line comment token, represents the comment. +// +// single-line comment token, represents the comment. // // When formatting, the leading spaces of the first tokens in each of these // cells is adjusted to align vertically their occurences on consecutive diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/hclwrite/parser.go b/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/hclwrite/parser.go index 53415aeba..b36153dfd 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/hclwrite/parser.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/hclwrite/parser.go @@ -521,10 +521,10 @@ func writerTokens(nativeTokens hclsyntax.Tokens) Tokens { // boundaries, such that the slice operator could be used to produce // three token sequences for before, within, and after respectively: // -// start, end := partitionTokens(toks, rng) -// before := toks[:start] -// within := toks[start:end] -// after := toks[end:] +// start, end := partitionTokens(toks, rng) +// before := toks[:start] +// within := toks[start:end] +// after := toks[end:] // // This works best when the range is aligned with token boundaries (e.g. // because it was produced in terms of the scanner's result) but if that isn't diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/traversal_for_expr.go b/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/traversal_for_expr.go index 87eeb1599..d3cb4507e 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/traversal_for_expr.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/hashicorp/hcl/v2/traversal_for_expr.go @@ -74,7 +74,7 @@ func RelTraversalForExpr(expr Expression) (Traversal, Diagnostics) { // For example, the following attribute has an expression that would produce // the keyword "foo": // -// example = foo +// example = foo // // This function is a variant of AbsTraversalForExpr, which uses the same // interface on the given expression. This helper constrains the result @@ -84,16 +84,16 @@ func RelTraversalForExpr(expr Expression) (Traversal, Diagnostics) { // situations where one of a fixed set of keywords is required and arbitrary // expressions are not allowed: // -// switch hcl.ExprAsKeyword(expr) { -// case "allow": -// // (take suitable action for keyword "allow") -// case "deny": -// // (take suitable action for keyword "deny") -// default: -// diags = append(diags, &hcl.Diagnostic{ -// // ... "invalid keyword" diagnostic message ... -// }) -// } +// switch hcl.ExprAsKeyword(expr) { +// case "allow": +// // (take suitable action for keyword "allow") +// case "deny": +// // (take suitable action for keyword "deny") +// default: +// diags = append(diags, &hcl.Diagnostic{ +// // ... "invalid keyword" diagnostic message ... +// }) +// } // // The above approach will generate the same message for both the use of an // unrecognized keyword and for not using a keyword at all, which is usually diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/jonboulle/clockwork/clockwork.go b/new-components/enrichers/custom-annotation/vendor/github.com/jonboulle/clockwork/clockwork.go index 3206b36e4..90dc9c82f 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/jonboulle/clockwork/clockwork.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/jonboulle/clockwork/clockwork.go @@ -307,7 +307,7 @@ func (fc *fakeClock) setExpirer(e expirer, d time.Duration) { return fc.waiters[i].expiry().Before(fc.waiters[j].expiry()) }) - // Notify blockers of our new waiter. + // Notify blockers of our new waiter. var blocked []*blocker count := len(fc.waiters) for _, b := range fc.blockers { diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/mattn/go-isatty/isatty_windows.go b/new-components/enrichers/custom-annotation/vendor/github.com/mattn/go-isatty/isatty_windows.go index 8e3c99171..367adab99 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/mattn/go-isatty/isatty_windows.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/mattn/go-isatty/isatty_windows.go @@ -42,7 +42,8 @@ func IsTerminal(fd uintptr) bool { // Check pipe name is used for cygwin/msys2 pty. // Cygwin/MSYS2 PTY has a name like: -// \{cygwin,msys}-XXXXXXXXXXXXXXXX-ptyN-{from,to}-master +// +// \{cygwin,msys}-XXXXXXXXXXXXXXXX-ptyN-{from,to}-master func isCygwinPipeName(name string) bool { token := strings.Split(name, "-") if len(token) < 5 { diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/mitchellh/copystructure/copystructure.go b/new-components/enrichers/custom-annotation/vendor/github.com/mitchellh/copystructure/copystructure.go index 8089e6670..bf4b5df81 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/mitchellh/copystructure/copystructure.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/mitchellh/copystructure/copystructure.go @@ -18,20 +18,19 @@ const tagKey = "copy" // // For structs, copy behavior can be controlled with struct tags. For example: // -// struct { -// Name string -// Data *bytes.Buffer `copy:"shallow"` -// } +// struct { +// Name string +// Data *bytes.Buffer `copy:"shallow"` +// } // // The available tag values are: // -// * "ignore" - The field will be ignored, effectively resulting in it being -// assigned the zero value in the copy. -// -// * "shallow" - The field will be be shallow copied. This means that references -// values such as pointers, maps, slices, etc. will be directly assigned -// versus deep copied. +// - "ignore" - The field will be ignored, effectively resulting in it being +// assigned the zero value in the copy. // +// - "shallow" - The field will be be shallow copied. This means that references +// values such as pointers, maps, slices, etc. will be directly assigned +// versus deep copied. func Copy(v interface{}) (interface{}, error) { return Config{}.Copy(v) } diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go b/new-components/enrichers/custom-annotation/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go index 7fee7b050..2f7a976d6 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go @@ -81,7 +81,6 @@ type PointerValueWalker interface { // // - Struct: skips all fields from being walked // - StructField: skips walking the struct value -// var SkipEntry = errors.New("skip this entry") // Walk takes an arbitrary value and an interface and traverses the diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/pmezard/go-difflib/difflib/difflib.go b/new-components/enrichers/custom-annotation/vendor/github.com/pmezard/go-difflib/difflib/difflib.go index 003e99fad..2a73737af 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/pmezard/go-difflib/difflib/difflib.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/pmezard/go-difflib/difflib/difflib.go @@ -199,12 +199,15 @@ func (m *SequenceMatcher) isBJunk(s string) bool { // If IsJunk is not defined: // // Return (i,j,k) such that a[i:i+k] is equal to b[j:j+k], where -// alo <= i <= i+k <= ahi -// blo <= j <= j+k <= bhi +// +// alo <= i <= i+k <= ahi +// blo <= j <= j+k <= bhi +// // and for all (i',j',k') meeting those conditions, -// k >= k' -// i <= i' -// and if i == i', j <= j' +// +// k >= k' +// i <= i' +// and if i == i', j <= j' // // In other words, of all maximal matching blocks, return one that // starts earliest in a, and of all those maximal matching blocks that diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/russross/blackfriday/v2/doc.go b/new-components/enrichers/custom-annotation/vendor/github.com/russross/blackfriday/v2/doc.go index 57ff152a0..2a5cc5b67 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/russross/blackfriday/v2/doc.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/russross/blackfriday/v2/doc.go @@ -16,7 +16,7 @@ // If you're interested in calling Blackfriday from command line, see // https://github.com/russross/blackfriday-tool. // -// Sanitized Anchor Names +// # Sanitized Anchor Names // // Blackfriday includes an algorithm for creating sanitized anchor names // corresponding to a given input text. This algorithm is used to create diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/russross/blackfriday/v2/inline.go b/new-components/enrichers/custom-annotation/vendor/github.com/russross/blackfriday/v2/inline.go index d45bd9417..e13d42572 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/russross/blackfriday/v2/inline.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/russross/blackfriday/v2/inline.go @@ -735,7 +735,9 @@ func linkEndsWithEntity(data []byte, linkEnd int) bool { } // hasPrefixCaseInsensitive is a custom implementation of -// strings.HasPrefix(strings.ToLower(s), prefix) +// +// strings.HasPrefix(strings.ToLower(s), prefix) +// // we rolled our own because ToLower pulls in a huge machinery of lowercasing // anything from Unicode and that's very slow. Since this func will only be // used on ASCII protocol prefixes, we can take shortcuts. diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/russross/blackfriday/v2/markdown.go b/new-components/enrichers/custom-annotation/vendor/github.com/russross/blackfriday/v2/markdown.go index 58d2e4538..382db9e9d 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/russross/blackfriday/v2/markdown.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/russross/blackfriday/v2/markdown.go @@ -345,8 +345,8 @@ func WithNoExtensions() Option { // In Markdown, the link reference syntax can be made to resolve a link to // a reference instead of an inline URL, in one of the following ways: // -// * [link text][refid] -// * [refid][] +// - [link text][refid] +// - [refid][] // // Usually, the refid is defined at the bottom of the Markdown document. If // this override function is provided, the refid is passed to the override @@ -363,7 +363,9 @@ func WithRefOverride(o ReferenceOverrideFunc) Option { // block of markdown-encoded text. // // The simplest invocation of Run takes one argument, input: -// output := Run(input) +// +// output := Run(input) +// // This will parse the input with CommonExtensions enabled and render it with // the default HTMLRenderer (with CommonHTMLFlags). // @@ -371,13 +373,15 @@ func WithRefOverride(o ReferenceOverrideFunc) Option { // type does not contain exported fields, you can not use it directly. Instead, // use the With* functions. For example, this will call the most basic // functionality, with no extensions: -// output := Run(input, WithNoExtensions()) +// +// output := Run(input, WithNoExtensions()) // // You can use any number of With* arguments, even contradicting ones. They // will be applied in order of appearance and the latter will override the // former: -// output := Run(input, WithNoExtensions(), WithExtensions(exts), -// WithRenderer(yourRenderer)) +// +// output := Run(input, WithNoExtensions(), WithExtensions(exts), +// WithRenderer(yourRenderer)) func Run(input []byte, opts ...Option) []byte { r := NewHTMLRenderer(HTMLRendererParameters{ Flags: CommonHTMLFlags, @@ -491,35 +495,35 @@ func (p *Markdown) parseRefsToAST() { // // Consider this markdown with reference-style links: // -// [link][ref] +// [link][ref] // -// [ref]: /url/ "tooltip title" +// [ref]: /url/ "tooltip title" // // It will be ultimately converted to this HTML: // -//

link

+//

link

// // And a reference structure will be populated as follows: // -// p.refs["ref"] = &reference{ -// link: "/url/", -// title: "tooltip title", -// } +// p.refs["ref"] = &reference{ +// link: "/url/", +// title: "tooltip title", +// } // // Alternatively, reference can contain information about a footnote. Consider // this markdown: // -// Text needing a footnote.[^a] +// Text needing a footnote.[^a] // -// [^a]: This is the note +// [^a]: This is the note // // A reference structure will be populated as follows: // -// p.refs["a"] = &reference{ -// link: "a", -// title: "This is the note", -// noteID: , -// } +// p.refs["a"] = &reference{ +// link: "a", +// title: "This is the note", +// noteID: , +// } // // TODO: As you can see, it begs for splitting into two dedicated structures // for refs and for footnotes. diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/stretchr/testify/require/require.go b/new-components/enrichers/custom-annotation/vendor/github.com/stretchr/testify/require/require.go index 506a82f80..1e5217ed4 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/stretchr/testify/require/require.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/stretchr/testify/require/require.go @@ -3,10 +3,11 @@ package require import ( - assert "github.com/stretchr/testify/assert" http "net/http" url "net/url" time "time" + + assert "github.com/stretchr/testify/assert" ) // Condition uses a Comparison to assert a complex condition. diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/stretchr/testify/require/require_forward.go b/new-components/enrichers/custom-annotation/vendor/github.com/stretchr/testify/require/require_forward.go index eee8310a5..c0b21eac7 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/stretchr/testify/require/require_forward.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/stretchr/testify/require/require_forward.go @@ -3,10 +3,11 @@ package require import ( - assert "github.com/stretchr/testify/assert" http "net/http" url "net/url" time "time" + + assert "github.com/stretchr/testify/assert" ) // Condition uses a Comparison to assert a complex condition. diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/element_iterator.go b/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/element_iterator.go index 62c9ea57c..ed8b0b3fb 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/element_iterator.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/element_iterator.go @@ -11,11 +11,11 @@ import ( // // Its usage pattern is as follows: // -// it := val.ElementIterator() -// for it.Next() { -// key, val := it.Element() -// // ... -// } +// it := val.ElementIterator() +// for it.Next() { +// key, val := it.Element() +// // ... +// } type ElementIterator interface { Next() bool Element() (key Value, value Value) diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/function/stdlib/datetime.go b/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/function/stdlib/datetime.go index 85f58d4cc..26c4545a0 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/function/stdlib/datetime.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/function/stdlib/datetime.go @@ -243,30 +243,30 @@ var TimeAddFunc = function.New(&function.Spec{ // // The full set of supported mnemonic sequences is listed below: // -// YY Year modulo 100 zero-padded to two digits, like "06". -// YYYY Four (or more) digit year, like "2006". -// M Month number, like "1" for January. -// MM Month number zero-padded to two digits, like "01". -// MMM English month name abbreviated to three letters, like "Jan". -// MMMM English month name unabbreviated, like "January". -// D Day of month number, like "2". -// DD Day of month number zero-padded to two digits, like "02". -// EEE English day of week name abbreviated to three letters, like "Mon". -// EEEE English day of week name unabbreviated, like "Monday". -// h 24-hour number, like "2". -// hh 24-hour number zero-padded to two digits, like "02". -// H 12-hour number, like "2". -// HH 12-hour number zero-padded to two digits, like "02". -// AA Hour AM/PM marker in uppercase, like "AM". -// aa Hour AM/PM marker in lowercase, like "am". -// m Minute within hour, like "5". -// mm Minute within hour zero-padded to two digits, like "05". -// s Second within minute, like "9". -// ss Second within minute zero-padded to two digits, like "09". -// ZZZZ Timezone offset with just sign and digit, like "-0800". -// ZZZZZ Timezone offset with colon separating hours and minutes, like "-08:00". -// Z Like ZZZZZ but with a special case "Z" for UTC. -// ZZZ Like ZZZZ but with a special case "UTC" for UTC. +// YY Year modulo 100 zero-padded to two digits, like "06". +// YYYY Four (or more) digit year, like "2006". +// M Month number, like "1" for January. +// MM Month number zero-padded to two digits, like "01". +// MMM English month name abbreviated to three letters, like "Jan". +// MMMM English month name unabbreviated, like "January". +// D Day of month number, like "2". +// DD Day of month number zero-padded to two digits, like "02". +// EEE English day of week name abbreviated to three letters, like "Mon". +// EEEE English day of week name unabbreviated, like "Monday". +// h 24-hour number, like "2". +// hh 24-hour number zero-padded to two digits, like "02". +// H 12-hour number, like "2". +// HH 12-hour number zero-padded to two digits, like "02". +// AA Hour AM/PM marker in uppercase, like "AM". +// aa Hour AM/PM marker in lowercase, like "am". +// m Minute within hour, like "5". +// mm Minute within hour zero-padded to two digits, like "05". +// s Second within minute, like "9". +// ss Second within minute zero-padded to two digits, like "09". +// ZZZZ Timezone offset with just sign and digit, like "-0800". +// ZZZZZ Timezone offset with colon separating hours and minutes, like "-08:00". +// Z Like ZZZZZ but with a special case "Z" for UTC. +// ZZZ Like ZZZZ but with a special case "UTC" for UTC. // // The format syntax is optimized mainly for generating machine-oriented // timestamps rather than human-oriented timestamps; the English language diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go b/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go index 2339cc33a..2135c6ae4 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go @@ -199,32 +199,32 @@ var FormatListFunc = function.New(&function.Spec{ // // It supports the following "verbs": // -// %% Literal percent sign, consuming no value -// %v A default formatting of the value based on type, as described below. -// %#v JSON serialization of the value -// %t Converts to boolean and then produces "true" or "false" -// %b Converts to number, requires integer, produces binary representation -// %d Converts to number, requires integer, produces decimal representation -// %o Converts to number, requires integer, produces octal representation -// %x Converts to number, requires integer, produces hexadecimal representation -// with lowercase letters -// %X Like %x but with uppercase letters -// %e Converts to number, produces scientific notation like -1.234456e+78 -// %E Like %e but with an uppercase "E" representing the exponent -// %f Converts to number, produces decimal representation with fractional -// part but no exponent, like 123.456 -// %g %e for large exponents or %f otherwise -// %G %E for large exponents or %f otherwise -// %s Converts to string and produces the string's characters -// %q Converts to string and produces JSON-quoted string representation, -// like %v. +// %% Literal percent sign, consuming no value +// %v A default formatting of the value based on type, as described below. +// %#v JSON serialization of the value +// %t Converts to boolean and then produces "true" or "false" +// %b Converts to number, requires integer, produces binary representation +// %d Converts to number, requires integer, produces decimal representation +// %o Converts to number, requires integer, produces octal representation +// %x Converts to number, requires integer, produces hexadecimal representation +// with lowercase letters +// %X Like %x but with uppercase letters +// %e Converts to number, produces scientific notation like -1.234456e+78 +// %E Like %e but with an uppercase "E" representing the exponent +// %f Converts to number, produces decimal representation with fractional +// part but no exponent, like 123.456 +// %g %e for large exponents or %f otherwise +// %G %E for large exponents or %f otherwise +// %s Converts to string and produces the string's characters +// %q Converts to string and produces JSON-quoted string representation, +// like %v. // // The default format selections made by %v are: // -// string %s -// number %g -// bool %t -// other %#v +// string %s +// number %g +// bool %t +// other %#v // // Null values produce the literal keyword "null" for %v and %#v, and produce // an error otherwise. @@ -236,10 +236,10 @@ var FormatListFunc = function.New(&function.Spec{ // is used. A period with no following number is invalid. // For examples: // -// %f default width, default precision -// %9f width 9, default precision -// %.2f default width, precision 2 -// %9.2f width 9, precision 2 +// %f default width, default precision +// %9f width 9, default precision +// %.2f default width, precision 2 +// %9.2f width 9, precision 2 // // Width and precision are measured in unicode characters (grapheme clusters). // @@ -256,10 +256,10 @@ var FormatListFunc = function.New(&function.Spec{ // The following additional symbols can be used immediately after the percent // introducer as flags: // -// (a space) leave a space where the sign would be if number is positive -// + Include a sign for a number even if it is positive (numeric only) -// - Pad with spaces on the left rather than the right -// 0 Pad with zeros rather than spaces. +// (a space) leave a space where the sign would be if number is positive +// + Include a sign for a number even if it is positive (numeric only) +// - Pad with spaces on the left rather than the right +// 0 Pad with zeros rather than spaces. // // Flag characters are ignored for verbs that do not support them. // diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/gocty/in.go b/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/gocty/in.go index 6cb308b53..cd643d1fd 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/gocty/in.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/gocty/in.go @@ -528,10 +528,10 @@ func toCtyPassthrough(wrappedVal reflect.Value, wantTy cty.Type, path cty.Path) // toCtyUnwrapPointer is a helper for dealing with Go pointers. It has three // possible outcomes: // -// - Given value isn't a pointer, so it's just returned as-is. -// - Given value is a non-nil pointer, in which case it is dereferenced -// and the result returned. -// - Given value is a nil pointer, in which case an invalid value is returned. +// - Given value isn't a pointer, so it's just returned as-is. +// - Given value is a non-nil pointer, in which case it is dereferenced +// and the result returned. +// - Given value is a nil pointer, in which case an invalid value is returned. // // For nested pointer types, like **int, they are all dereferenced in turn // until a non-pointer value is found, or until a nil pointer is encountered. diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/list_type.go b/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/list_type.go index 2ef02a12f..f52ab8822 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/list_type.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/list_type.go @@ -63,9 +63,9 @@ func (t Type) IsListType() bool { // otherwise. This is intended to allow convenient conditional branches, // like so: // -// if et := t.ListElementType(); et != nil { -// // Do something with *et -// } +// if et := t.ListElementType(); et != nil { +// // Do something with *et +// } func (t Type) ListElementType() *Type { if lt, ok := t.typeImpl.(typeList); ok { return <.ElementTypeT diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/map_type.go b/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/map_type.go index 732c78a80..6ff67c633 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/map_type.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/map_type.go @@ -63,9 +63,9 @@ func (t Type) IsMapType() bool { // otherwise. This is intended to allow convenient conditional branches, // like so: // -// if et := t.MapElementType(); et != nil { -// // Do something with *et -// } +// if et := t.MapElementType(); et != nil { +// // Do something with *et +// } func (t Type) MapElementType() *Type { if lt, ok := t.typeImpl.(typeMap); ok { return <.ElementTypeT diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/set/ops.go b/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/set/ops.go index ffd950ac6..ea856f723 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/set/ops.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/set/ops.go @@ -84,11 +84,11 @@ func (s Set[T]) Copy() Set[T] { // // The pattern for using the returned iterator is: // -// it := set.Iterator() -// for it.Next() { -// val := it.Value() -// // ... -// } +// it := set.Iterator() +// for it.Next() { +// val := it.Value() +// // ... +// } // // Once an iterator has been created for a set, the set *must not* be mutated // until the iterator is no longer in use. diff --git a/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/set_type.go b/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/set_type.go index cbc3706f2..1ac62e6b5 100644 --- a/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/set_type.go +++ b/new-components/enrichers/custom-annotation/vendor/github.com/zclconf/go-cty/cty/set_type.go @@ -61,9 +61,9 @@ func (t Type) IsSetType() bool { // otherwise. This is intended to allow convenient conditional branches, // like so: // -// if et := t.SetElementType(); et != nil { -// // Do something with *et -// } +// if et := t.SetElementType(); et != nil { +// // Do something with *et +// } func (t Type) SetElementType() *Type { if lt, ok := t.typeImpl.(typeSet); ok { return <.ElementTypeT diff --git a/new-components/enrichers/custom-annotation/vendor/golang.org/x/tools/cmd/cover/html.go b/new-components/enrichers/custom-annotation/vendor/golang.org/x/tools/cmd/cover/html.go index 0f8c72542..d39c677b8 100644 --- a/new-components/enrichers/custom-annotation/vendor/golang.org/x/tools/cmd/cover/html.go +++ b/new-components/enrichers/custom-annotation/vendor/golang.org/x/tools/cmd/cover/html.go @@ -8,7 +8,6 @@ import ( "bufio" "bytes" "fmt" - exec "golang.org/x/sys/execabs" "html/template" "io" "io/ioutil" @@ -17,6 +16,8 @@ import ( "path/filepath" "runtime" + exec "golang.org/x/sys/execabs" + "golang.org/x/tools/cover" ) diff --git a/new-components/enrichers/custom-annotation/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go b/new-components/enrichers/custom-annotation/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go index 63c639e4f..63835cc77 100644 --- a/new-components/enrichers/custom-annotation/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go +++ b/new-components/enrichers/custom-annotation/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go @@ -25,12 +25,13 @@ package grpc_binarylog_v1 import ( + reflect "reflect" + sync "sync" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" ) const ( diff --git a/new-components/enrichers/custom-annotation/vendor/google.golang.org/protobuf/internal/impl/merge_gen.go b/new-components/enrichers/custom-annotation/vendor/google.golang.org/protobuf/internal/impl/merge_gen.go index 8816c274d..819826883 100644 --- a/new-components/enrichers/custom-annotation/vendor/google.golang.org/protobuf/internal/impl/merge_gen.go +++ b/new-components/enrichers/custom-annotation/vendor/google.golang.org/protobuf/internal/impl/merge_gen.go @@ -6,8 +6,6 @@ package impl -import () - func mergeBool(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { *dst.Bool() = *src.Bool() } diff --git a/new-components/enrichers/custom-annotation/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go b/new-components/enrichers/custom-annotation/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go index 87da199a3..1030bfbed 100644 --- a/new-components/enrichers/custom-annotation/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go +++ b/new-components/enrichers/custom-annotation/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go @@ -115,13 +115,14 @@ package anypb import ( + reflect "reflect" + strings "strings" + sync "sync" + proto "google.golang.org/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoregistry "google.golang.org/protobuf/reflect/protoregistry" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - strings "strings" - sync "sync" ) // `Any` contains an arbitrary serialized protocol buffer message along with a diff --git a/new-components/enrichers/custom-annotation/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go b/new-components/enrichers/custom-annotation/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go index b99d4d241..d774511a7 100644 --- a/new-components/enrichers/custom-annotation/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go +++ b/new-components/enrichers/custom-annotation/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go @@ -74,12 +74,13 @@ package durationpb import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" math "math" reflect "reflect" sync "sync" time "time" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) // A Duration represents a signed, fixed-length span of time represented diff --git a/new-components/enrichers/custom-annotation/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go b/new-components/enrichers/custom-annotation/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go index 8f206a661..e2a73a220 100644 --- a/new-components/enrichers/custom-annotation/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go +++ b/new-components/enrichers/custom-annotation/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go @@ -121,13 +121,14 @@ package structpb import ( base64 "encoding/base64" json "encoding/json" - protojson "google.golang.org/protobuf/encoding/protojson" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" math "math" reflect "reflect" sync "sync" utf8 "unicode/utf8" + + protojson "google.golang.org/protobuf/encoding/protojson" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) // `NullValue` is a singleton enumeration to represent the null value for the diff --git a/new-components/enrichers/custom-annotation/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go b/new-components/enrichers/custom-annotation/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go index 0d20722d7..b2402b523 100644 --- a/new-components/enrichers/custom-annotation/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go +++ b/new-components/enrichers/custom-annotation/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go @@ -73,11 +73,12 @@ package timestamppb import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" time "time" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) // A Timestamp represents a point in time independent of any time zone or local diff --git a/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/apic.go b/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/apic.go index ae7d049f1..05fd305da 100644 --- a/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/apic.go +++ b/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/apic.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/emitterc.go b/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/emitterc.go index 0f47c9ca8..dde20e507 100644 --- a/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/emitterc.go +++ b/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/emitterc.go @@ -162,10 +162,9 @@ func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool { // Check if we need to accumulate more events before emitting. // // We accumulate extra -// - 1 event for DOCUMENT-START -// - 2 events for SEQUENCE-START -// - 3 events for MAPPING-START -// +// - 1 event for DOCUMENT-START +// - 2 events for SEQUENCE-START +// - 3 events for MAPPING-START func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool { if emitter.events_head == len(emitter.events) { return true @@ -241,7 +240,7 @@ func yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentless bool emitter.indent += 2 } else { // Everything else aligns to the chosen indentation. - emitter.indent = emitter.best_indent*((emitter.indent+emitter.best_indent)/emitter.best_indent) + emitter.indent = emitter.best_indent * ((emitter.indent + emitter.best_indent) / emitter.best_indent) } } return true diff --git a/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/parserc.go b/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/parserc.go index 268558a0d..25fe82363 100644 --- a/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/parserc.go +++ b/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/parserc.go @@ -227,7 +227,8 @@ func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool // Parse the production: // stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// ************ +// +// ************ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -249,9 +250,12 @@ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// * +// +// * +// // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// ************************* +// +// ************************* func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool { token := peek_token(parser) @@ -356,8 +360,8 @@ func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t // Parse the productions: // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// *********** // +// *********** func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -379,9 +383,10 @@ func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// ************* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* // +// ************* +// +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -428,30 +433,41 @@ func yaml_parser_set_event_comments(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // block_node_or_indentless_sequence ::= -// ALIAS -// ***** -// | properties (block_content | indentless_block_sequence)? -// ********** * -// | block_content | indentless_block_sequence -// * +// +// ALIAS +// ***** +// | properties (block_content | indentless_block_sequence)? +// ********** * +// | block_content | indentless_block_sequence +// * +// // block_node ::= ALIAS -// ***** -// | properties block_content? -// ********** * -// | block_content -// * +// +// ***** +// | properties block_content? +// ********** * +// | block_content +// * +// // flow_node ::= ALIAS -// ***** -// | properties flow_content? -// ********** * -// | flow_content -// * +// +// ***** +// | properties flow_content? +// ********** * +// | flow_content +// * +// // properties ::= TAG ANCHOR? | ANCHOR TAG? -// ************************* +// +// ************************* +// // block_content ::= block_collection | flow_collection | SCALAR -// ****** +// +// ****** +// // flow_content ::= flow_collection | SCALAR -// ****** +// +// ****** func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool { //defer trace("yaml_parser_parse_node", "block:", block, "indentless_sequence:", indentless_sequence)() @@ -682,8 +698,8 @@ func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, i // Parse the productions: // block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// ******************** *********** * ********* // +// ******************** *********** * ********* func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -740,7 +756,8 @@ func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_e // Parse the productions: // indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// *********** * +// +// *********** * func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -805,14 +822,14 @@ func yaml_parser_split_stem_comment(parser *yaml_parser_t, stem_len int) { // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START -// ******************* -// ((KEY block_node_or_indentless_sequence?)? -// *** * -// (VALUE block_node_or_indentless_sequence?)?)* // -// BLOCK-END -// ********* +// ******************* +// ((KEY block_node_or_indentless_sequence?)? +// *** * +// (VALUE block_node_or_indentless_sequence?)?)* // +// BLOCK-END +// ********* func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -881,13 +898,11 @@ func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_even // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START // -// ((KEY block_node_or_indentless_sequence?)? -// -// (VALUE block_node_or_indentless_sequence?)?)* -// ***** * -// BLOCK-END -// +// ((KEY block_node_or_indentless_sequence?)? // +// (VALUE block_node_or_indentless_sequence?)?)* +// ***** * +// BLOCK-END func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -915,16 +930,18 @@ func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_ev // Parse the productions: // flow_sequence ::= FLOW-SEQUENCE-START -// ******************* -// (flow_sequence_entry FLOW-ENTRY)* -// * ********** -// flow_sequence_entry? -// * -// FLOW-SEQUENCE-END -// ***************** +// +// ******************* +// (flow_sequence_entry FLOW-ENTRY)* +// * ********** +// flow_sequence_entry? +// * +// FLOW-SEQUENCE-END +// ***************** +// // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -987,11 +1004,10 @@ func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_ev return true } -// // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// *** * // +// *** * func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -1011,8 +1027,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, ev // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// ***** * // +// ***** * func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -1035,8 +1051,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -1053,16 +1069,17 @@ func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, ev // Parse the productions: // flow_mapping ::= FLOW-MAPPING-START -// ****************** -// (flow_mapping_entry FLOW-ENTRY)* -// * ********** -// flow_mapping_entry? -// ****************** -// FLOW-MAPPING-END -// **************** -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * *** * // +// ****************** +// (flow_mapping_entry FLOW-ENTRY)* +// * ********** +// flow_mapping_entry? +// ****************** +// FLOW-MAPPING-END +// **************** +// +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// - *** * func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -1128,8 +1145,7 @@ func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event // Parse the productions: // flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * ***** * -// +// - ***** * func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { token := peek_token(parser) if token == nil { diff --git a/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/readerc.go b/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/readerc.go index b7de0a89c..56af24536 100644 --- a/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/readerc.go +++ b/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/readerc.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/scannerc.go b/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/scannerc.go index ca0070108..30b1f0892 100644 --- a/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/scannerc.go +++ b/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/scannerc.go @@ -1614,11 +1614,11 @@ func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool { // Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %YAML 1.1 # a comment \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool { // Eat '%'. start_mark := parser.mark @@ -1719,11 +1719,11 @@ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool // Scan the directive name. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^ // +// %YAML 1.1 # a comment \n +// ^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool { // Consume the directive name. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1758,8 +1758,9 @@ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark // Scan the value of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^ +// +// %YAML 1.1 # a comment \n +// ^^^^^^ func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool { // Eat whitespaces. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1797,10 +1798,11 @@ const max_number_length = 2 // Scan the version number of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^ -// %YAML 1.1 # a comment \n -// ^ +// +// %YAML 1.1 # a comment \n +// ^ +// %YAML 1.1 # a comment \n +// ^ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool { // Repeat while the next character is digit. @@ -1834,9 +1836,9 @@ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark // Scan the value of a TAG-DIRECTIVE token. // // Scope: -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool { var handle_value, prefix_value []byte @@ -2847,7 +2849,7 @@ func yaml_parser_scan_line_comment(parser *yaml_parser_t, token_mark yaml_mark_t continue } if parser.buffer[parser.buffer_pos+peek] == '#' { - seen := parser.mark.index+peek + seen := parser.mark.index + peek for { if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { return false @@ -2876,7 +2878,7 @@ func yaml_parser_scan_line_comment(parser *yaml_parser_t, token_mark yaml_mark_t parser.comments = append(parser.comments, yaml_comment_t{ token_mark: token_mark, start_mark: start_mark, - line: text, + line: text, }) } return true @@ -2910,7 +2912,7 @@ func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) boo // the foot is the line below it. var foot_line = -1 if scan_mark.line > 0 { - foot_line = parser.mark.line-parser.newlines+1 + foot_line = parser.mark.line - parser.newlines + 1 if parser.newlines == 0 && parser.mark.column > 1 { foot_line++ } @@ -2996,7 +2998,7 @@ func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) boo recent_empty = false // Consume until after the consumed comment line. - seen := parser.mark.index+peek + seen := parser.mark.index + peek for { if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { return false diff --git a/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/writerc.go b/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/writerc.go index b8a116bf9..266d0b092 100644 --- a/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/writerc.go +++ b/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/writerc.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/yaml.go b/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/yaml.go index 8cec6da48..f0bedf3d6 100644 --- a/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/yaml.go +++ b/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/yaml.go @@ -17,8 +17,7 @@ // // Source code and other details for the project are available at GitHub: // -// https://github.com/go-yaml/yaml -// +// https://github.com/go-yaml/yaml package yaml import ( @@ -75,16 +74,15 @@ type Marshaler interface { // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// var t T -// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// var t T +// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) // // See the documentation of Marshal for the format of tags and a list of // supported tag options. -// func Unmarshal(in []byte, out interface{}) (err error) { return unmarshal(in, out, false) } @@ -185,36 +183,35 @@ func unmarshal(in []byte, out interface{}, strict bool) (err error) { // // The field tag format accepted is: // -// `(...) yaml:"[][,[,]]" (...)` +// `(...) yaml:"[][,[,]]" (...)` // // The following flags are currently supported: // -// omitempty Only include the field if it's not set to the zero -// value for the type or to empty slices or maps. -// Zero valued structs will be omitted if all their public -// fields are zero, unless they implement an IsZero -// method (see the IsZeroer interface type), in which -// case the field will be excluded if IsZero returns true. +// omitempty Only include the field if it's not set to the zero +// value for the type or to empty slices or maps. +// Zero valued structs will be omitted if all their public +// fields are zero, unless they implement an IsZero +// method (see the IsZeroer interface type), in which +// case the field will be excluded if IsZero returns true. // -// flow Marshal using a flow style (useful for structs, -// sequences and maps). +// flow Marshal using a flow style (useful for structs, +// sequences and maps). // -// inline Inline the field, which must be a struct or a map, -// causing all of its fields or keys to be processed as if -// they were part of the outer struct. For maps, keys must -// not conflict with the yaml keys of other struct fields. +// inline Inline the field, which must be a struct or a map, +// causing all of its fields or keys to be processed as if +// they were part of the outer struct. For maps, keys must +// not conflict with the yaml keys of other struct fields. // // In addition, if the key is "-", the field is ignored. // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" -// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" -// +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" +// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" func Marshal(in interface{}) (out []byte, err error) { defer handleErr(&err) e := newEncoder() @@ -358,22 +355,21 @@ const ( // // For example: // -// var person struct { -// Name string -// Address yaml.Node -// } -// err := yaml.Unmarshal(data, &person) -// -// Or by itself: +// var person struct { +// Name string +// Address yaml.Node +// } +// err := yaml.Unmarshal(data, &person) // -// var person Node -// err := yaml.Unmarshal(data, &person) +// Or by itself: // +// var person Node +// err := yaml.Unmarshal(data, &person) type Node struct { // Kind defines whether the node is a document, a mapping, a sequence, // a scalar value, or an alias to another node. The specific data type of // scalar nodes may be obtained via the ShortTag and LongTag methods. - Kind Kind + Kind Kind // Style allows customizing the apperance of the node in the tree. Style Style @@ -421,7 +417,6 @@ func (n *Node) IsZero() bool { n.HeadComment == "" && n.LineComment == "" && n.FootComment == "" && n.Line == 0 && n.Column == 0 } - // LongTag returns the long form of the tag that indicates the data type for // the node. If the Tag field isn't explicitly defined, one will be computed // based on the node properties. diff --git a/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/yamlh.go b/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/yamlh.go index 7c6d00770..ddcd5513b 100644 --- a/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/yamlh.go +++ b/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/yamlh.go @@ -438,7 +438,9 @@ type yaml_document_t struct { // The number of written bytes should be set to the size_read variable. // // [in,out] data A pointer to an application data specified by -// yaml_parser_set_input(). +// +// yaml_parser_set_input(). +// // [out] buffer The buffer to write the data from the source. // [in] size The size of the buffer. // [out] size_read The actual number of bytes read from the source. @@ -639,7 +641,6 @@ type yaml_parser_t struct { } type yaml_comment_t struct { - scan_mark yaml_mark_t // Position where scanning for comments started token_mark yaml_mark_t // Position after which tokens will be associated with this comment start_mark yaml_mark_t // Position of '#' comment mark @@ -659,13 +660,14 @@ type yaml_comment_t struct { // @a buffer to the output. // // @param[in,out] data A pointer to an application data specified by -// yaml_emitter_set_output(). +// +// yaml_emitter_set_output(). +// // @param[in] buffer The buffer with bytes to be written. // @param[in] size The size of the buffer. // // @returns On success, the handler should return @c 1. If the handler failed, // the returned value should be @c 0. -// type yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error type yaml_emitter_state_t int diff --git a/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/yamlprivateh.go b/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/yamlprivateh.go index e88f9c54a..dea1ba961 100644 --- a/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/yamlprivateh.go +++ b/new-components/enrichers/custom-annotation/vendor/gopkg.in/yaml.v3/yamlprivateh.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -137,8 +137,8 @@ func is_crlf(b []byte, i int) bool { func is_breakz(b []byte, i int) bool { //return is_break(b, i) || is_z(b, i) return ( - // is_break: - b[i] == '\r' || // CR (#xD) + // is_break: + b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) @@ -151,8 +151,8 @@ func is_breakz(b []byte, i int) bool { func is_spacez(b []byte, i int) bool { //return is_space(b, i) || is_breakz(b, i) return ( - // is_space: - b[i] == ' ' || + // is_space: + b[i] == ' ' || // is_breakz: b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) @@ -166,8 +166,8 @@ func is_spacez(b []byte, i int) bool { func is_blankz(b []byte, i int) bool { //return is_blank(b, i) || is_breakz(b, i) return ( - // is_blank: - b[i] == ' ' || b[i] == '\t' || + // is_blank: + b[i] == ' ' || b[i] == '\t' || // is_breakz: b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) diff --git a/new-components/reporters/json-logger/vendor/github.com/Masterminds/goutils/cryptorandomstringutils.go b/new-components/reporters/json-logger/vendor/github.com/Masterminds/goutils/cryptorandomstringutils.go index 8dbd92485..79ab47340 100644 --- a/new-components/reporters/json-logger/vendor/github.com/Masterminds/goutils/cryptorandomstringutils.go +++ b/new-components/reporters/json-logger/vendor/github.com/Masterminds/goutils/cryptorandomstringutils.go @@ -29,9 +29,11 @@ CryptoRandomNonAlphaNumeric creates a random string whose length is the number o Characters will be chosen from the set of all characters (ASCII/Unicode values between 0 to 2,147,483,647 (math.MaxInt32)). Parameter: + count - the length of random string to create Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, CryptoRandom(...) */ @@ -44,9 +46,11 @@ CryptoRandomAscii creates a random string whose length is the number of characte Characters will be chosen from the set of characters whose ASCII value is between 32 and 126 (inclusive). Parameter: + count - the length of random string to create Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, CryptoRandom(...) */ @@ -59,9 +63,11 @@ CryptoRandomNumeric creates a random string whose length is the number of charac Characters will be chosen from the set of numeric characters. Parameter: + count - the length of random string to create Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, CryptoRandom(...) */ @@ -74,11 +80,13 @@ CryptoRandomAlphabetic creates a random string whose length is the number of cha Characters will be chosen from the set of alpha-numeric characters as indicated by the arguments. Parameters: + count - the length of random string to create letters - if true, generated string may include alphabetic characters numbers - if true, generated string may include numeric characters Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, CryptoRandom(...) */ @@ -91,9 +99,11 @@ CryptoRandomAlphaNumeric creates a random string whose length is the number of c Characters will be chosen from the set of alpha-numeric characters. Parameter: + count - the length of random string to create Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, CryptoRandom(...) */ @@ -106,11 +116,13 @@ CryptoRandomAlphaNumericCustom creates a random string whose length is the numbe Characters will be chosen from the set of alpha-numeric characters as indicated by the arguments. Parameters: + count - the length of random string to create letters - if true, generated string may include alphabetic characters numbers - if true, generated string may include numeric characters Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, CryptoRandom(...) */ @@ -125,6 +137,7 @@ unless letters and numbers are both false, in which case, start and end are set If chars is not nil, characters stored in chars that are between start and end are chosen. Parameters: + count - the length of random string to create start - the position in set of chars (ASCII/Unicode int) to start at end - the position in set of chars (ASCII/Unicode int) to end before @@ -133,6 +146,7 @@ Parameters: chars - the set of chars to choose randoms from. If nil, then it will use the set of all chars. Returns: + string - the random string error - an error stemming from invalid parameters: if count < 0; or the provided chars array is empty; or end <= start; or end > len(chars) */ diff --git a/new-components/reporters/json-logger/vendor/github.com/Masterminds/goutils/randomstringutils.go b/new-components/reporters/json-logger/vendor/github.com/Masterminds/goutils/randomstringutils.go index 272670231..7ee8bc3f2 100644 --- a/new-components/reporters/json-logger/vendor/github.com/Masterminds/goutils/randomstringutils.go +++ b/new-components/reporters/json-logger/vendor/github.com/Masterminds/goutils/randomstringutils.go @@ -32,9 +32,11 @@ RandomNonAlphaNumeric creates a random string whose length is the number of char Characters will be chosen from the set of all characters (ASCII/Unicode values between 0 to 2,147,483,647 (math.MaxInt32)). Parameter: + count - the length of random string to create Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, RandomSeed(...) */ @@ -47,9 +49,11 @@ RandomAscii creates a random string whose length is the number of characters spe Characters will be chosen from the set of characters whose ASCII value is between 32 and 126 (inclusive). Parameter: + count - the length of random string to create Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, RandomSeed(...) */ @@ -62,9 +66,11 @@ RandomNumeric creates a random string whose length is the number of characters s Characters will be chosen from the set of numeric characters. Parameter: + count - the length of random string to create Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, RandomSeed(...) */ @@ -77,9 +83,11 @@ RandomAlphabetic creates a random string whose length is the number of character Characters will be chosen from the set of alphabetic characters. Parameters: + count - the length of random string to create Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, RandomSeed(...) */ @@ -92,9 +100,11 @@ RandomAlphaNumeric creates a random string whose length is the number of charact Characters will be chosen from the set of alpha-numeric characters. Parameter: + count - the length of random string to create Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, RandomSeed(...) */ @@ -107,11 +117,13 @@ RandomAlphaNumericCustom creates a random string whose length is the number of c Characters will be chosen from the set of alpha-numeric characters as indicated by the arguments. Parameters: + count - the length of random string to create letters - if true, generated string may include alphabetic characters numbers - if true, generated string may include numeric characters Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, RandomSeed(...) */ @@ -125,6 +137,7 @@ This method has exactly the same semantics as RandomSeed(int, int, int, bool, bo instead of using an externally supplied source of randomness, it uses the internal *rand.Rand instance. Parameters: + count - the length of random string to create start - the position in set of chars (ASCII/Unicode int) to start at end - the position in set of chars (ASCII/Unicode int) to end before @@ -133,6 +146,7 @@ Parameters: chars - the set of chars to choose randoms from. If nil, then it will use the set of all chars. Returns: + string - the random string error - an error stemming from an invalid parameter within underlying function, RandomSeed(...) */ @@ -149,6 +163,7 @@ This method accepts a user-supplied *rand.Rand instance to use as a source of ra with a fixed seed and using it for each call, the same random sequence of strings can be generated repeatedly and predictably. Parameters: + count - the length of random string to create start - the position in set of chars (ASCII/Unicode decimals) to start at end - the position in set of chars (ASCII/Unicode decimals) to end before @@ -158,6 +173,7 @@ Parameters: random - a source of randomness. Returns: + string - the random string error - an error stemming from invalid parameters: if count < 0; or the provided chars array is empty; or end <= start; or end > len(chars) */ diff --git a/new-components/reporters/json-logger/vendor/github.com/Masterminds/goutils/stringutils.go b/new-components/reporters/json-logger/vendor/github.com/Masterminds/goutils/stringutils.go index 741bb530e..3d47f09db 100644 --- a/new-components/reporters/json-logger/vendor/github.com/Masterminds/goutils/stringutils.go +++ b/new-components/reporters/json-logger/vendor/github.com/Masterminds/goutils/stringutils.go @@ -31,18 +31,20 @@ Abbreviate abbreviates a string using ellipses. This will turn the string "Now Specifically, the algorithm is as follows: - - If str is less than maxWidth characters long, return it. - - Else abbreviate it to (str[0:maxWidth - 3] + "..."). - - If maxWidth is less than 4, return an illegal argument error. - - In no case will it return a string of length greater than maxWidth. + - If str is less than maxWidth characters long, return it. + - Else abbreviate it to (str[0:maxWidth - 3] + "..."). + - If maxWidth is less than 4, return an illegal argument error. + - In no case will it return a string of length greater than maxWidth. Parameters: - str - the string to check - maxWidth - maximum length of result string, must be at least 4 + + str - the string to check + maxWidth - maximum length of result string, must be at least 4 Returns: - string - abbreviated string - error - if the width is too small + + string - abbreviated string + error - if the width is too small */ func Abbreviate(str string, maxWidth int) (string, error) { return AbbreviateFull(str, 0, maxWidth) @@ -56,13 +58,15 @@ somewhere in the result. In no case will it return a string of length greater than maxWidth. Parameters: - str - the string to check - offset - left edge of source string - maxWidth - maximum length of result string, must be at least 4 + + str - the string to check + offset - left edge of source string + maxWidth - maximum length of result string, must be at least 4 Returns: - string - abbreviated string - error - if the width is too small + + string - abbreviated string + error - if the width is too small */ func AbbreviateFull(str string, offset int, maxWidth int) (string, error) { if str == "" { @@ -101,10 +105,12 @@ DeleteWhiteSpace deletes all whitespaces from a string as defined by unicode.IsS It returns the string without whitespaces. Parameter: - str - the string to delete whitespace from, may be nil + + str - the string to delete whitespace from, may be nil Returns: - the string without whitespaces + + the string without whitespaces */ func DeleteWhiteSpace(str string) string { if str == "" { @@ -130,11 +136,13 @@ func DeleteWhiteSpace(str string) string { IndexOfDifference compares two strings, and returns the index at which the strings begin to differ. Parameters: - str1 - the first string - str2 - the second string + + str1 - the first string + str2 - the second string Returns: - the index where str1 and str2 begin to differ; -1 if they are equal + + the index where str1 and str2 begin to differ; -1 if they are equal */ func IndexOfDifference(str1 string, str2 string) int { if str1 == str2 { @@ -158,16 +166,18 @@ func IndexOfDifference(str1 string, str2 string) int { /* IsBlank checks if a string is whitespace or empty (""). Observe the following behavior: - goutils.IsBlank("") = true - goutils.IsBlank(" ") = true - goutils.IsBlank("bob") = false - goutils.IsBlank(" bob ") = false + goutils.IsBlank("") = true + goutils.IsBlank(" ") = true + goutils.IsBlank("bob") = false + goutils.IsBlank(" bob ") = false Parameter: - str - the string to check + + str - the string to check Returns: - true - if the string is whitespace or empty ("") + + true - if the string is whitespace or empty ("") */ func IsBlank(str string) bool { strLen := len(str) @@ -190,12 +200,14 @@ An empty string ("") will return -1 (INDEX_NOT_FOUND). A negative start position A start position greater than the string length returns -1. Parameters: - str - the string to check - sub - the substring to find - start - the start position; negative treated as zero + + str - the string to check + sub - the substring to find + start - the start position; negative treated as zero Returns: - the first index where the sub string was found (always >= start) + + the first index where the sub string was found (always >= start) */ func IndexOf(str string, sub string, start int) int { diff --git a/new-components/reporters/json-logger/vendor/github.com/Masterminds/goutils/wordutils.go b/new-components/reporters/json-logger/vendor/github.com/Masterminds/goutils/wordutils.go index 034cad8e2..8e9ee337a 100644 --- a/new-components/reporters/json-logger/vendor/github.com/Masterminds/goutils/wordutils.go +++ b/new-components/reporters/json-logger/vendor/github.com/Masterminds/goutils/wordutils.go @@ -21,29 +21,29 @@ errors while others do not, so usage would vary as a result. Example: - package main + package main - import ( - "fmt" - "github.com/aokoli/goutils" - ) + import ( + "fmt" + "github.com/aokoli/goutils" + ) - func main() { + func main() { - // EXAMPLE 1: A goutils function which returns no errors - fmt.Println (goutils.Initials("John Doe Foo")) // Prints out "JDF" + // EXAMPLE 1: A goutils function which returns no errors + fmt.Println (goutils.Initials("John Doe Foo")) // Prints out "JDF" - // EXAMPLE 2: A goutils function which returns an error - rand1, err1 := goutils.Random (-1, 0, 0, true, true) + // EXAMPLE 2: A goutils function which returns an error + rand1, err1 := goutils.Random (-1, 0, 0, true, true) - if err1 != nil { - fmt.Println(err1) // Prints out error message because -1 was entered as the first parameter in goutils.Random(...) - } else { - fmt.Println(rand1) - } - } + if err1 != nil { + fmt.Println(err1) // Prints out error message because -1 was entered as the first parameter in goutils.Random(...) + } else { + fmt.Println(rand1) + } + } */ package goutils @@ -62,11 +62,13 @@ New lines will be separated by '\n'. Very long words, such as URLs will not be w Leading spaces on a new line are stripped. Trailing spaces are not stripped. Parameters: - str - the string to be word wrapped - wrapLength - the column (a column can fit only one character) to wrap the words at, less than 1 is treated as 1 + + str - the string to be word wrapped + wrapLength - the column (a column can fit only one character) to wrap the words at, less than 1 is treated as 1 Returns: - a line with newlines inserted + + a line with newlines inserted */ func Wrap(str string, wrapLength int) string { return WrapCustom(str, wrapLength, "", false) @@ -77,13 +79,15 @@ WrapCustom wraps a single line of text, identifying words by ' '. Leading spaces on a new line are stripped. Trailing spaces are not stripped. Parameters: - str - the string to be word wrapped - wrapLength - the column number (a column can fit only one character) to wrap the words at, less than 1 is treated as 1 - newLineStr - the string to insert for a new line, "" uses '\n' - wrapLongWords - true if long words (such as URLs) should be wrapped + + str - the string to be word wrapped + wrapLength - the column number (a column can fit only one character) to wrap the words at, less than 1 is treated as 1 + newLineStr - the string to insert for a new line, "" uses '\n' + wrapLongWords - true if long words (such as URLs) should be wrapped Returns: - a line with newlines inserted + + a line with newlines inserted */ func WrapCustom(str string, wrapLength int, newLineStr string, wrapLongWords bool) string { @@ -157,11 +161,13 @@ and the first non-delimiter character after a delimiter will be capitalized. A " Capitalization uses the Unicode title case, normally equivalent to upper case. Parameters: - str - the string to capitalize - delimiters - set of characters to determine capitalization, exclusion of this parameter means whitespace would be delimeter + + str - the string to capitalize + delimiters - set of characters to determine capitalization, exclusion of this parameter means whitespace would be delimeter Returns: - capitalized string + + capitalized string */ func Capitalize(str string, delimiters ...rune) string { @@ -199,11 +205,13 @@ to separate words. The first string character and the first non-delimiter charac Capitalization uses the Unicode title case, normally equivalent to upper case. Parameters: - str - the string to capitalize fully - delimiters - set of characters to determine capitalization, exclusion of this parameter means whitespace would be delimeter + + str - the string to capitalize fully + delimiters - set of characters to determine capitalization, exclusion of this parameter means whitespace would be delimeter Returns: - capitalized string + + capitalized string */ func CapitalizeFully(str string, delimiters ...rune) string { @@ -228,11 +236,13 @@ The delimiters represent a set of characters understood to separate words. The f character after a delimiter will be uncapitalized. Whitespace is defined by unicode.IsSpace(char). Parameters: - str - the string to uncapitalize fully - delimiters - set of characters to determine capitalization, exclusion of this parameter means whitespace would be delimeter + + str - the string to uncapitalize fully + delimiters - set of characters to determine capitalization, exclusion of this parameter means whitespace would be delimeter Returns: - uncapitalized string + + uncapitalized string */ func Uncapitalize(str string, delimiters ...rune) string { @@ -267,17 +277,19 @@ SwapCase swaps the case of a string using a word based algorithm. Conversion algorithm: - Upper case character converts to Lower case - Title case character converts to Lower case - Lower case character after Whitespace or at start converts to Title case - Other Lower case character converts to Upper case - Whitespace is defined by unicode.IsSpace(char). + Upper case character converts to Lower case + Title case character converts to Lower case + Lower case character after Whitespace or at start converts to Title case + Other Lower case character converts to Upper case + Whitespace is defined by unicode.IsSpace(char). Parameters: - str - the string to swap case + + str - the string to swap case Returns: - the changed string + + the changed string */ func SwapCase(str string) string { if str == "" { @@ -315,10 +327,13 @@ letters after the defined delimiters are returned as a new string. Their case is parameter is excluded, then Whitespace is used. Whitespace is defined by unicode.IsSpacea(char). An empty delimiter array returns an empty string. Parameters: - str - the string to get initials from - delimiters - set of characters to determine words, exclusion of this parameter means whitespace would be delimeter + + str - the string to get initials from + delimiters - set of characters to determine words, exclusion of this parameter means whitespace would be delimeter + Returns: - string of initial letters + + string of initial letters */ func Initials(str string, delimiters ...rune) string { if str == "" { diff --git a/new-components/reporters/json-logger/vendor/github.com/Masterminds/sprig/v3/numeric.go b/new-components/reporters/json-logger/vendor/github.com/Masterminds/sprig/v3/numeric.go index f68e4182e..84fe18de0 100644 --- a/new-components/reporters/json-logger/vendor/github.com/Masterminds/sprig/v3/numeric.go +++ b/new-components/reporters/json-logger/vendor/github.com/Masterminds/sprig/v3/numeric.go @@ -6,8 +6,8 @@ import ( "strconv" "strings" - "github.com/spf13/cast" "github.com/shopspring/decimal" + "github.com/spf13/cast" ) // toFloat64 converts 64-bit floats diff --git a/new-components/reporters/json-logger/vendor/github.com/bmatcuk/doublestar/doublestar.go b/new-components/reporters/json-logger/vendor/github.com/bmatcuk/doublestar/doublestar.go index 206e01202..1edce3c55 100644 --- a/new-components/reporters/json-logger/vendor/github.com/bmatcuk/doublestar/doublestar.go +++ b/new-components/reporters/json-logger/vendor/github.com/bmatcuk/doublestar/doublestar.go @@ -192,23 +192,23 @@ func isZeroLengthPattern(pattern string) (ret bool, err error) { // Match returns true if name matches the shell file name pattern. // The pattern syntax is: // -// pattern: -// { term } -// term: -// '*' matches any sequence of non-path-separators -// '**' matches any sequence of characters, including -// path separators. -// '?' matches any single non-path-separator character -// '[' [ '^' ] { character-range } ']' -// character class (must be non-empty) -// '{' { term } [ ',' { term } ... ] '}' -// c matches character c (c != '*', '?', '\\', '[') -// '\\' c matches character c +// pattern: +// { term } +// term: +// '*' matches any sequence of non-path-separators +// '**' matches any sequence of characters, including +// path separators. +// '?' matches any single non-path-separator character +// '[' [ '^' ] { character-range } ']' +// character class (must be non-empty) +// '{' { term } [ ',' { term } ... ] '}' +// c matches character c (c != '*', '?', '\\', '[') +// '\\' c matches character c // -// character-range: -// c matches character c (c != '\\', '-', ']') -// '\\' c matches character c -// lo '-' hi matches character c for lo <= c <= hi +// character-range: +// c matches character c (c != '\\', '-', ']') +// '\\' c matches character c +// lo '-' hi matches character c for lo <= c <= hi // // Match requires pattern to match all of name, not just a substring. // The path-separator defaults to the '/' character. The only possible @@ -218,7 +218,6 @@ func isZeroLengthPattern(pattern string) (ret bool, err error) { // always uses '/' as the path separator. If you want to support systems // which use a different path separator (such as Windows), what you want // is the PathMatch() function below. -// func Match(pattern, name string) (bool, error) { return matchWithSeparator(pattern, name, '/') } @@ -229,7 +228,6 @@ func Match(pattern, name string) (bool, error) { // disabled. // // Note: this is meant as a drop-in replacement for filepath.Match(). -// func PathMatch(pattern, name string) (bool, error) { return PathMatchOS(StandardOS, pattern, name) } @@ -243,28 +241,27 @@ func PathMatchOS(vos OS, pattern, name string) (bool, error) { // Match returns true if name matches the shell file name pattern. // The pattern syntax is: // -// pattern: -// { term } -// term: -// '*' matches any sequence of non-path-separators -// '**' matches any sequence of characters, including -// path separators. -// '?' matches any single non-path-separator character -// '[' [ '^' ] { character-range } ']' -// character class (must be non-empty) -// '{' { term } [ ',' { term } ... ] '}' -// c matches character c (c != '*', '?', '\\', '[') -// '\\' c matches character c +// pattern: +// { term } +// term: +// '*' matches any sequence of non-path-separators +// '**' matches any sequence of characters, including +// path separators. +// '?' matches any single non-path-separator character +// '[' [ '^' ] { character-range } ']' +// character class (must be non-empty) +// '{' { term } [ ',' { term } ... ] '}' +// c matches character c (c != '*', '?', '\\', '[') +// '\\' c matches character c // -// character-range: -// c matches character c (c != '\\', '-', ']') -// '\\' c matches character c, unless separator is '\\' -// lo '-' hi matches character c for lo <= c <= hi +// character-range: +// c matches character c (c != '\\', '-', ']') +// '\\' c matches character c, unless separator is '\\' +// lo '-' hi matches character c for lo <= c <= hi // // Match requires pattern to match all of name, not just a substring. // The only possible returned error is ErrBadPattern, when pattern // is malformed. -// func matchWithSeparator(pattern, name string, separator rune) (bool, error) { nameComponents := splitPathOnSeparator(name, separator) return doMatching(pattern, nameComponents) @@ -340,7 +337,6 @@ func doMatching(pattern string, nameComponents []string) (matched bool, err erro // disabled. // // Note: this is meant as a drop-in replacement for filepath.Glob(). -// func Glob(pattern string) (matches []string, err error) { return GlobOS(StandardOS, pattern) } diff --git a/new-components/reporters/json-logger/vendor/github.com/davecgh/go-spew/spew/bypass.go b/new-components/reporters/json-logger/vendor/github.com/davecgh/go-spew/spew/bypass.go index 792994785..70ddeaad3 100644 --- a/new-components/reporters/json-logger/vendor/github.com/davecgh/go-spew/spew/bypass.go +++ b/new-components/reporters/json-logger/vendor/github.com/davecgh/go-spew/spew/bypass.go @@ -18,6 +18,7 @@ // tag is deprecated and thus should not be used. // Go versions prior to 1.4 are disabled because they use a different layout // for interfaces which make the implementation of unsafeReflectValue more complex. +//go:build !js && !appengine && !safe && !disableunsafe && go1.4 // +build !js,!appengine,!safe,!disableunsafe,go1.4 package spew diff --git a/new-components/reporters/json-logger/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go b/new-components/reporters/json-logger/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go index 205c28d68..5e2d890d6 100644 --- a/new-components/reporters/json-logger/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go +++ b/new-components/reporters/json-logger/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go @@ -16,6 +16,7 @@ // when the code is running on Google App Engine, compiled by GopherJS, or // "-tags safe" is added to the go build command line. The "disableunsafe" // tag is deprecated and thus should not be used. +//go:build js || appengine || safe || disableunsafe || !go1.4 // +build js appengine safe disableunsafe !go1.4 package spew diff --git a/new-components/reporters/json-logger/vendor/github.com/davecgh/go-spew/spew/config.go b/new-components/reporters/json-logger/vendor/github.com/davecgh/go-spew/spew/config.go index 2e3d22f31..161895fc6 100644 --- a/new-components/reporters/json-logger/vendor/github.com/davecgh/go-spew/spew/config.go +++ b/new-components/reporters/json-logger/vendor/github.com/davecgh/go-spew/spew/config.go @@ -254,15 +254,15 @@ pointer addresses used to indirect to the final value. It provides the following features over the built-in printing facilities provided by the fmt package: - * Pointers are dereferenced and followed - * Circular data structures are detected and handled properly - * Custom Stringer/error interfaces are optionally invoked, including - on unexported types - * Custom types which only implement the Stringer/error interfaces via - a pointer receiver are optionally invoked when passing non-pointer - variables - * Byte arrays and slices are dumped like the hexdump -C command which - includes offsets, byte values in hex, and ASCII output + - Pointers are dereferenced and followed + - Circular data structures are detected and handled properly + - Custom Stringer/error interfaces are optionally invoked, including + on unexported types + - Custom types which only implement the Stringer/error interfaces via + a pointer receiver are optionally invoked when passing non-pointer + variables + - Byte arrays and slices are dumped like the hexdump -C command which + includes offsets, byte values in hex, and ASCII output The configuration options are controlled by modifying the public members of c. See ConfigState for options documentation. @@ -295,12 +295,12 @@ func (c *ConfigState) convertArgs(args []interface{}) (formatters []interface{}) // NewDefaultConfig returns a ConfigState with the following default settings. // -// Indent: " " -// MaxDepth: 0 -// DisableMethods: false -// DisablePointerMethods: false -// ContinueOnMethod: false -// SortKeys: false +// Indent: " " +// MaxDepth: 0 +// DisableMethods: false +// DisablePointerMethods: false +// ContinueOnMethod: false +// SortKeys: false func NewDefaultConfig() *ConfigState { return &ConfigState{Indent: " "} } diff --git a/new-components/reporters/json-logger/vendor/github.com/davecgh/go-spew/spew/doc.go b/new-components/reporters/json-logger/vendor/github.com/davecgh/go-spew/spew/doc.go index aacaac6f1..722e9aa79 100644 --- a/new-components/reporters/json-logger/vendor/github.com/davecgh/go-spew/spew/doc.go +++ b/new-components/reporters/json-logger/vendor/github.com/davecgh/go-spew/spew/doc.go @@ -21,35 +21,36 @@ debugging. A quick overview of the additional features spew provides over the built-in printing facilities for Go data types are as follows: - * Pointers are dereferenced and followed - * Circular data structures are detected and handled properly - * Custom Stringer/error interfaces are optionally invoked, including - on unexported types - * Custom types which only implement the Stringer/error interfaces via - a pointer receiver are optionally invoked when passing non-pointer - variables - * Byte arrays and slices are dumped like the hexdump -C command which - includes offsets, byte values in hex, and ASCII output (only when using - Dump style) + - Pointers are dereferenced and followed + - Circular data structures are detected and handled properly + - Custom Stringer/error interfaces are optionally invoked, including + on unexported types + - Custom types which only implement the Stringer/error interfaces via + a pointer receiver are optionally invoked when passing non-pointer + variables + - Byte arrays and slices are dumped like the hexdump -C command which + includes offsets, byte values in hex, and ASCII output (only when using + Dump style) There are two different approaches spew allows for dumping Go data structures: - * Dump style which prints with newlines, customizable indentation, - and additional debug information such as types and all pointer addresses - used to indirect to the final value - * A custom Formatter interface that integrates cleanly with the standard fmt - package and replaces %v, %+v, %#v, and %#+v to provide inline printing - similar to the default %v while providing the additional functionality - outlined above and passing unsupported format verbs such as %x and %q - along to fmt + - Dump style which prints with newlines, customizable indentation, + and additional debug information such as types and all pointer addresses + used to indirect to the final value + - A custom Formatter interface that integrates cleanly with the standard fmt + package and replaces %v, %+v, %#v, and %#+v to provide inline printing + similar to the default %v while providing the additional functionality + outlined above and passing unsupported format verbs such as %x and %q + along to fmt -Quick Start +# Quick Start This section demonstrates how to quickly get started with spew. See the sections below for further details on formatting and configuration options. To dump a variable with full newlines, indentation, type, and pointer information use Dump, Fdump, or Sdump: + spew.Dump(myVar1, myVar2, ...) spew.Fdump(someWriter, myVar1, myVar2, ...) str := spew.Sdump(myVar1, myVar2, ...) @@ -58,12 +59,13 @@ Alternatively, if you would prefer to use format strings with a compacted inline printing style, use the convenience wrappers Printf, Fprintf, etc with %v (most compact), %+v (adds pointer addresses), %#v (adds types), or %#+v (adds types and pointer addresses): + spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2) spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2) spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) -Configuration Options +# Configuration Options Configuration of spew is handled by fields in the ConfigState type. For convenience, all of the top-level functions use a global state available @@ -74,51 +76,52 @@ equivalent to the top-level functions. This allows concurrent configuration options. See the ConfigState documentation for more details. The following configuration options are available: - * Indent - String to use for each indentation level for Dump functions. - It is a single space by default. A popular alternative is "\t". - - * MaxDepth - Maximum number of levels to descend into nested data structures. - There is no limit by default. - - * DisableMethods - Disables invocation of error and Stringer interface methods. - Method invocation is enabled by default. - - * DisablePointerMethods - Disables invocation of error and Stringer interface methods on types - which only accept pointer receivers from non-pointer variables. - Pointer method invocation is enabled by default. - - * DisablePointerAddresses - DisablePointerAddresses specifies whether to disable the printing of - pointer addresses. This is useful when diffing data structures in tests. - - * DisableCapacities - DisableCapacities specifies whether to disable the printing of - capacities for arrays, slices, maps and channels. This is useful when - diffing data structures in tests. - - * ContinueOnMethod - Enables recursion into types after invoking error and Stringer interface - methods. Recursion after method invocation is disabled by default. - - * SortKeys - Specifies map keys should be sorted before being printed. Use - this to have a more deterministic, diffable output. Note that - only native types (bool, int, uint, floats, uintptr and string) - and types which implement error or Stringer interfaces are - supported with other types sorted according to the - reflect.Value.String() output which guarantees display - stability. Natural map order is used by default. - - * SpewKeys - Specifies that, as a last resort attempt, map keys should be - spewed to strings and sorted by those strings. This is only - considered if SortKeys is true. - -Dump Usage + + - Indent + String to use for each indentation level for Dump functions. + It is a single space by default. A popular alternative is "\t". + + - MaxDepth + Maximum number of levels to descend into nested data structures. + There is no limit by default. + + - DisableMethods + Disables invocation of error and Stringer interface methods. + Method invocation is enabled by default. + + - DisablePointerMethods + Disables invocation of error and Stringer interface methods on types + which only accept pointer receivers from non-pointer variables. + Pointer method invocation is enabled by default. + + - DisablePointerAddresses + DisablePointerAddresses specifies whether to disable the printing of + pointer addresses. This is useful when diffing data structures in tests. + + - DisableCapacities + DisableCapacities specifies whether to disable the printing of + capacities for arrays, slices, maps and channels. This is useful when + diffing data structures in tests. + + - ContinueOnMethod + Enables recursion into types after invoking error and Stringer interface + methods. Recursion after method invocation is disabled by default. + + - SortKeys + Specifies map keys should be sorted before being printed. Use + this to have a more deterministic, diffable output. Note that + only native types (bool, int, uint, floats, uintptr and string) + and types which implement error or Stringer interfaces are + supported with other types sorted according to the + reflect.Value.String() output which guarantees display + stability. Natural map order is used by default. + + - SpewKeys + Specifies that, as a last resort attempt, map keys should be + spewed to strings and sorted by those strings. This is only + considered if SortKeys is true. + +# Dump Usage Simply call spew.Dump with a list of variables you want to dump: @@ -133,7 +136,7 @@ A third option is to call spew.Sdump to get the formatted output as a string: str := spew.Sdump(myVar1, myVar2, ...) -Sample Dump Output +# Sample Dump Output See the Dump example for details on the setup of the types and variables being shown here. @@ -150,13 +153,14 @@ shown here. Byte (and uint8) arrays and slices are displayed uniquely like the hexdump -C command as shown. + ([]uint8) (len=32 cap=32) { 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... | 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0| 00000020 31 32 |12| } -Custom Formatter +# Custom Formatter Spew provides a custom formatter that implements the fmt.Formatter interface so that it integrates cleanly with standard fmt package printing functions. The @@ -170,7 +174,7 @@ standard fmt package for formatting. In addition, the custom formatter ignores the width and precision arguments (however they will still work on the format specifiers not handled by the custom formatter). -Custom Formatter Usage +# Custom Formatter Usage The simplest way to make use of the spew custom formatter is to call one of the convenience functions such as spew.Printf, spew.Println, or spew.Printf. The @@ -184,15 +188,17 @@ functions have syntax you are most likely already familiar with: See the Index for the full list convenience functions. -Sample Formatter Output +# Sample Formatter Output Double pointer to a uint8: + %v: <**>5 %+v: <**>(0xf8400420d0->0xf8400420c8)5 %#v: (**uint8)5 %#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5 Pointer to circular struct with a uint8 field and a pointer to itself: + %v: <*>{1 <*>} %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)} %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)} @@ -201,7 +207,7 @@ Pointer to circular struct with a uint8 field and a pointer to itself: See the Printf example for details on the setup of variables being shown here. -Errors +# Errors Since it is possible for custom Stringer/error interfaces to panic, spew detects them and handles them internally by printing the panic information diff --git a/new-components/reporters/json-logger/vendor/github.com/davecgh/go-spew/spew/dump.go b/new-components/reporters/json-logger/vendor/github.com/davecgh/go-spew/spew/dump.go index f78d89fc1..8323041a4 100644 --- a/new-components/reporters/json-logger/vendor/github.com/davecgh/go-spew/spew/dump.go +++ b/new-components/reporters/json-logger/vendor/github.com/davecgh/go-spew/spew/dump.go @@ -488,15 +488,15 @@ pointer addresses used to indirect to the final value. It provides the following features over the built-in printing facilities provided by the fmt package: - * Pointers are dereferenced and followed - * Circular data structures are detected and handled properly - * Custom Stringer/error interfaces are optionally invoked, including - on unexported types - * Custom types which only implement the Stringer/error interfaces via - a pointer receiver are optionally invoked when passing non-pointer - variables - * Byte arrays and slices are dumped like the hexdump -C command which - includes offsets, byte values in hex, and ASCII output + - Pointers are dereferenced and followed + - Circular data structures are detected and handled properly + - Custom Stringer/error interfaces are optionally invoked, including + on unexported types + - Custom types which only implement the Stringer/error interfaces via + a pointer receiver are optionally invoked when passing non-pointer + variables + - Byte arrays and slices are dumped like the hexdump -C command which + includes offsets, byte values in hex, and ASCII output The configuration options are controlled by an exported package global, spew.Config. See ConfigState for options documentation. diff --git a/new-components/reporters/json-logger/vendor/github.com/go-errors/errors/error.go b/new-components/reporters/json-logger/vendor/github.com/go-errors/errors/error.go index ccbc2e427..533f1bb26 100644 --- a/new-components/reporters/json-logger/vendor/github.com/go-errors/errors/error.go +++ b/new-components/reporters/json-logger/vendor/github.com/go-errors/errors/error.go @@ -9,36 +9,36 @@ // // For example: // -// package crashy +// package crashy // -// import "github.com/go-errors/errors" +// import "github.com/go-errors/errors" // -// var Crashed = errors.Errorf("oh dear") +// var Crashed = errors.Errorf("oh dear") // -// func Crash() error { -// return errors.New(Crashed) -// } +// func Crash() error { +// return errors.New(Crashed) +// } // // This can be called as follows: // -// package main +// package main // -// import ( -// "crashy" -// "fmt" -// "github.com/go-errors/errors" -// ) +// import ( +// "crashy" +// "fmt" +// "github.com/go-errors/errors" +// ) // -// func main() { -// err := crashy.Crash() -// if err != nil { -// if errors.Is(err, crashy.Crashed) { -// fmt.Println(err.(*errors.Error).ErrorStack()) -// } else { -// panic(err) -// } -// } -// } +// func main() { +// err := crashy.Crash() +// if err != nil { +// if errors.Is(err, crashy.Crashed) { +// fmt.Println(err.(*errors.Error).ErrorStack()) +// } else { +// panic(err) +// } +// } +// } // // This package was original written to allow reporting to Bugsnag, // but after I found similar packages by Facebook and Dropbox, it diff --git a/new-components/reporters/json-logger/vendor/github.com/go-errors/errors/parse_panic.go b/new-components/reporters/json-logger/vendor/github.com/go-errors/errors/parse_panic.go index cc37052d7..d295563df 100644 --- a/new-components/reporters/json-logger/vendor/github.com/go-errors/errors/parse_panic.go +++ b/new-components/reporters/json-logger/vendor/github.com/go-errors/errors/parse_panic.go @@ -75,8 +75,8 @@ func ParsePanic(text string) (*Error, error) { // The lines we're passing look like this: // -// main.(*foo).destruct(0xc208067e98) -// /0/go/src/github.com/bugsnag/bugsnag-go/pan/main.go:22 +0x151 +// main.(*foo).destruct(0xc208067e98) +// /0/go/src/github.com/bugsnag/bugsnag-go/pan/main.go:22 +0x151 func parsePanicFrame(name string, line string, createdBy bool) (*StackFrame, error) { idx := strings.LastIndex(name, "(") if idx == -1 && !createdBy { diff --git a/new-components/reporters/json-logger/vendor/github.com/golang/mock/mockgen/version.1.11.go b/new-components/reporters/json-logger/vendor/github.com/golang/mock/mockgen/version.1.11.go index e6b25db23..cacf87933 100644 --- a/new-components/reporters/json-logger/vendor/github.com/golang/mock/mockgen/version.1.11.go +++ b/new-components/reporters/json-logger/vendor/github.com/golang/mock/mockgen/version.1.11.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build !go1.12 // +build !go1.12 package main diff --git a/new-components/reporters/json-logger/vendor/github.com/golang/mock/mockgen/version.1.12.go b/new-components/reporters/json-logger/vendor/github.com/golang/mock/mockgen/version.1.12.go index ad121ae63..a5e9e454f 100644 --- a/new-components/reporters/json-logger/vendor/github.com/golang/mock/mockgen/version.1.12.go +++ b/new-components/reporters/json-logger/vendor/github.com/golang/mock/mockgen/version.1.12.go @@ -13,6 +13,7 @@ // limitations under the License. // +//go:build go1.12 // +build go1.12 package main diff --git a/new-components/reporters/json-logger/vendor/github.com/google/uuid/dce.go b/new-components/reporters/json-logger/vendor/github.com/google/uuid/dce.go index fa820b9d3..9302a1c1b 100644 --- a/new-components/reporters/json-logger/vendor/github.com/google/uuid/dce.go +++ b/new-components/reporters/json-logger/vendor/github.com/google/uuid/dce.go @@ -42,7 +42,7 @@ func NewDCESecurity(domain Domain, id uint32) (UUID, error) { // NewDCEPerson returns a DCE Security (Version 2) UUID in the person // domain with the id returned by os.Getuid. // -// NewDCESecurity(Person, uint32(os.Getuid())) +// NewDCESecurity(Person, uint32(os.Getuid())) func NewDCEPerson() (UUID, error) { return NewDCESecurity(Person, uint32(os.Getuid())) } @@ -50,7 +50,7 @@ func NewDCEPerson() (UUID, error) { // NewDCEGroup returns a DCE Security (Version 2) UUID in the group // domain with the id returned by os.Getgid. // -// NewDCESecurity(Group, uint32(os.Getgid())) +// NewDCESecurity(Group, uint32(os.Getgid())) func NewDCEGroup() (UUID, error) { return NewDCESecurity(Group, uint32(os.Getgid())) } diff --git a/new-components/reporters/json-logger/vendor/github.com/google/uuid/hash.go b/new-components/reporters/json-logger/vendor/github.com/google/uuid/hash.go index dc60082d3..cee37578b 100644 --- a/new-components/reporters/json-logger/vendor/github.com/google/uuid/hash.go +++ b/new-components/reporters/json-logger/vendor/github.com/google/uuid/hash.go @@ -45,7 +45,7 @@ func NewHash(h hash.Hash, space UUID, data []byte, version int) UUID { // NewMD5 returns a new MD5 (Version 3) UUID based on the // supplied name space and data. It is the same as calling: // -// NewHash(md5.New(), space, data, 3) +// NewHash(md5.New(), space, data, 3) func NewMD5(space UUID, data []byte) UUID { return NewHash(md5.New(), space, data, 3) } @@ -53,7 +53,7 @@ func NewMD5(space UUID, data []byte) UUID { // NewSHA1 returns a new SHA1 (Version 5) UUID based on the // supplied name space and data. It is the same as calling: // -// NewHash(sha1.New(), space, data, 5) +// NewHash(sha1.New(), space, data, 5) func NewSHA1(space UUID, data []byte) UUID { return NewHash(sha1.New(), space, data, 5) } diff --git a/new-components/reporters/json-logger/vendor/github.com/google/uuid/node_js.go b/new-components/reporters/json-logger/vendor/github.com/google/uuid/node_js.go index b2a0bc871..f745d7017 100644 --- a/new-components/reporters/json-logger/vendor/github.com/google/uuid/node_js.go +++ b/new-components/reporters/json-logger/vendor/github.com/google/uuid/node_js.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build js // +build js package uuid diff --git a/new-components/reporters/json-logger/vendor/github.com/google/uuid/node_net.go b/new-components/reporters/json-logger/vendor/github.com/google/uuid/node_net.go index 0cbbcddbd..e91358f7d 100644 --- a/new-components/reporters/json-logger/vendor/github.com/google/uuid/node_net.go +++ b/new-components/reporters/json-logger/vendor/github.com/google/uuid/node_net.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !js // +build !js package uuid diff --git a/new-components/reporters/json-logger/vendor/github.com/google/uuid/null.go b/new-components/reporters/json-logger/vendor/github.com/google/uuid/null.go index d7fcbf286..06ecf9de2 100644 --- a/new-components/reporters/json-logger/vendor/github.com/google/uuid/null.go +++ b/new-components/reporters/json-logger/vendor/github.com/google/uuid/null.go @@ -17,15 +17,14 @@ var jsonNull = []byte("null") // NullUUID implements the SQL driver.Scanner interface so // it can be used as a scan destination: // -// var u uuid.NullUUID -// err := db.QueryRow("SELECT name FROM foo WHERE id=?", id).Scan(&u) -// ... -// if u.Valid { -// // use u.UUID -// } else { -// // NULL value -// } -// +// var u uuid.NullUUID +// err := db.QueryRow("SELECT name FROM foo WHERE id=?", id).Scan(&u) +// ... +// if u.Valid { +// // use u.UUID +// } else { +// // NULL value +// } type NullUUID struct { UUID UUID Valid bool // Valid is true if UUID is not NULL diff --git a/new-components/reporters/json-logger/vendor/github.com/google/uuid/uuid.go b/new-components/reporters/json-logger/vendor/github.com/google/uuid/uuid.go index 5232b4867..1051192bc 100644 --- a/new-components/reporters/json-logger/vendor/github.com/google/uuid/uuid.go +++ b/new-components/reporters/json-logger/vendor/github.com/google/uuid/uuid.go @@ -187,10 +187,12 @@ func Must(uuid UUID, err error) UUID { } // Validate returns an error if s is not a properly formatted UUID in one of the following formats: -// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} +// +// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx +// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx +// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} +// // It returns an error if the format is invalid, otherwise nil. func Validate(s string) error { switch len(s) { diff --git a/new-components/reporters/json-logger/vendor/github.com/google/uuid/version4.go b/new-components/reporters/json-logger/vendor/github.com/google/uuid/version4.go index 7697802e4..62ac27381 100644 --- a/new-components/reporters/json-logger/vendor/github.com/google/uuid/version4.go +++ b/new-components/reporters/json-logger/vendor/github.com/google/uuid/version4.go @@ -9,7 +9,7 @@ import "io" // New creates a new random UUID or panics. New is equivalent to // the expression // -// uuid.Must(uuid.NewRandom()) +// uuid.Must(uuid.NewRandom()) func New() UUID { return Must(NewRandom()) } @@ -17,7 +17,7 @@ func New() UUID { // NewString creates a new random UUID and returns it as a string or panics. // NewString is equivalent to the expression // -// uuid.New().String() +// uuid.New().String() func NewString() string { return Must(NewRandom()).String() } @@ -31,11 +31,11 @@ func NewString() string { // // A note about uniqueness derived from the UUID Wikipedia entry: // -// Randomly generated UUIDs have 122 random bits. One's annual risk of being -// hit by a meteorite is estimated to be one chance in 17 billion, that -// means the probability is about 0.00000000006 (6 × 10−11), -// equivalent to the odds of creating a few tens of trillions of UUIDs in a -// year and having one duplicate. +// Randomly generated UUIDs have 122 random bits. One's annual risk of being +// hit by a meteorite is estimated to be one chance in 17 billion, that +// means the probability is about 0.00000000006 (6 × 10−11), +// equivalent to the odds of creating a few tens of trillions of UUIDs in a +// year and having one duplicate. func NewRandom() (UUID, error) { if !poolEnabled { return NewRandomFromReader(rander) diff --git a/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/diagnostic.go b/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/diagnostic.go index 578f81a2c..c84225af1 100644 --- a/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/diagnostic.go +++ b/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/diagnostic.go @@ -121,7 +121,7 @@ func (d Diagnostics) Error() string { // This is provided as a convenience for returning from a function that // collects and then returns a set of diagnostics: // -// return nil, diags.Append(&hcl.Diagnostic{ ... }) +// return nil, diags.Append(&hcl.Diagnostic{ ... }) // // Note that this modifies the array underlying the diagnostics slice, so // must be used carefully within a single codepath. It is incorrect (and rude) diff --git a/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/doc.go b/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/doc.go index a0e3119f2..665ad6cad 100644 --- a/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/doc.go +++ b/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/doc.go @@ -9,25 +9,25 @@ // configurations in either native HCL syntax or JSON syntax into a Go struct // type: // -// package main +// package main // -// import ( -// "log" -// "github.com/hashicorp/hcl/v2/hclsimple" -// ) +// import ( +// "log" +// "github.com/hashicorp/hcl/v2/hclsimple" +// ) // -// type Config struct { -// LogLevel string `hcl:"log_level"` -// } +// type Config struct { +// LogLevel string `hcl:"log_level"` +// } // -// func main() { -// var config Config -// err := hclsimple.DecodeFile("config.hcl", nil, &config) -// if err != nil { -// log.Fatalf("Failed to load configuration: %s", err) -// } -// log.Printf("Configuration is %#v", config) -// } +// func main() { +// var config Config +// err := hclsimple.DecodeFile("config.hcl", nil, &config) +// if err != nil { +// log.Fatalf("Failed to load configuration: %s", err) +// } +// log.Printf("Configuration is %#v", config) +// } // // If your application needs more control over the evaluation of the // configuration, you can use the functions in the subdirectories hclparse, diff --git a/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/gohcl/doc.go b/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/gohcl/doc.go index cfec2530c..5e103a6a4 100644 --- a/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/gohcl/doc.go +++ b/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/gohcl/doc.go @@ -10,18 +10,18 @@ // A struct field tag scheme is used, similar to other decoding and // unmarshalling libraries. The tags are formatted as in the following example: // -// ThingType string `hcl:"thing_type,attr"` +// ThingType string `hcl:"thing_type,attr"` // // Within each tag there are two comma-separated tokens. The first is the // name of the corresponding construct in configuration, while the second // is a keyword giving the kind of construct expected. The following // kind keywords are supported: // -// attr (the default) indicates that the value is to be populated from an attribute -// block indicates that the value is to populated from a block -// label indicates that the value is to populated from a block label -// optional is the same as attr, but the field is optional -// remain indicates that the value is to be populated from the remaining body after populating other fields +// attr (the default) indicates that the value is to be populated from an attribute +// block indicates that the value is to populated from a block +// label indicates that the value is to populated from a block label +// optional is the same as attr, but the field is optional +// remain indicates that the value is to be populated from the remaining body after populating other fields // // "attr" fields may either be of type *hcl.Expression, in which case the raw // expression is assigned, or of any type accepted by gocty, in which case diff --git a/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression.go b/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression.go index 5ed352739..6c7b7c678 100644 --- a/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression.go +++ b/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression.go @@ -1244,9 +1244,9 @@ func (e *ObjectConsKeyExpr) UnwrapExpression() Expression { // ForExpr represents iteration constructs: // -// tuple = [for i, v in list: upper(v) if i > 2] -// object = {for k, v in map: k => upper(v)} -// object_of_tuples = {for v in list: v.key: v...} +// tuple = [for i, v in list: upper(v) if i > 2] +// object = {for k, v in map: k => upper(v)} +// object_of_tuples = {for v in list: v.key: v...} type ForExpr struct { KeyVar string // empty if ignoring the key ValVar string diff --git a/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/hclwrite/format.go b/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/hclwrite/format.go index d5f974c39..5e326b08a 100644 --- a/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/hclwrite/format.go +++ b/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/hclwrite/format.go @@ -452,9 +452,12 @@ func tokenBracketChange(tok *Token) int { // // lead: always present, representing everything up to one of the others // assign: if line contains an attribute assignment, represents the tokens -// starting at (and including) the equals symbol +// +// starting at (and including) the equals symbol +// // comment: if line contains any non-comment tokens and ends with a -// single-line comment token, represents the comment. +// +// single-line comment token, represents the comment. // // When formatting, the leading spaces of the first tokens in each of these // cells is adjusted to align vertically their occurences on consecutive diff --git a/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/hclwrite/parser.go b/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/hclwrite/parser.go index 53415aeba..b36153dfd 100644 --- a/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/hclwrite/parser.go +++ b/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/hclwrite/parser.go @@ -521,10 +521,10 @@ func writerTokens(nativeTokens hclsyntax.Tokens) Tokens { // boundaries, such that the slice operator could be used to produce // three token sequences for before, within, and after respectively: // -// start, end := partitionTokens(toks, rng) -// before := toks[:start] -// within := toks[start:end] -// after := toks[end:] +// start, end := partitionTokens(toks, rng) +// before := toks[:start] +// within := toks[start:end] +// after := toks[end:] // // This works best when the range is aligned with token boundaries (e.g. // because it was produced in terms of the scanner's result) but if that isn't diff --git a/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/traversal_for_expr.go b/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/traversal_for_expr.go index 87eeb1599..d3cb4507e 100644 --- a/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/traversal_for_expr.go +++ b/new-components/reporters/json-logger/vendor/github.com/hashicorp/hcl/v2/traversal_for_expr.go @@ -74,7 +74,7 @@ func RelTraversalForExpr(expr Expression) (Traversal, Diagnostics) { // For example, the following attribute has an expression that would produce // the keyword "foo": // -// example = foo +// example = foo // // This function is a variant of AbsTraversalForExpr, which uses the same // interface on the given expression. This helper constrains the result @@ -84,16 +84,16 @@ func RelTraversalForExpr(expr Expression) (Traversal, Diagnostics) { // situations where one of a fixed set of keywords is required and arbitrary // expressions are not allowed: // -// switch hcl.ExprAsKeyword(expr) { -// case "allow": -// // (take suitable action for keyword "allow") -// case "deny": -// // (take suitable action for keyword "deny") -// default: -// diags = append(diags, &hcl.Diagnostic{ -// // ... "invalid keyword" diagnostic message ... -// }) -// } +// switch hcl.ExprAsKeyword(expr) { +// case "allow": +// // (take suitable action for keyword "allow") +// case "deny": +// // (take suitable action for keyword "deny") +// default: +// diags = append(diags, &hcl.Diagnostic{ +// // ... "invalid keyword" diagnostic message ... +// }) +// } // // The above approach will generate the same message for both the use of an // unrecognized keyword and for not using a keyword at all, which is usually diff --git a/new-components/reporters/json-logger/vendor/github.com/jonboulle/clockwork/clockwork.go b/new-components/reporters/json-logger/vendor/github.com/jonboulle/clockwork/clockwork.go index 3206b36e4..90dc9c82f 100644 --- a/new-components/reporters/json-logger/vendor/github.com/jonboulle/clockwork/clockwork.go +++ b/new-components/reporters/json-logger/vendor/github.com/jonboulle/clockwork/clockwork.go @@ -307,7 +307,7 @@ func (fc *fakeClock) setExpirer(e expirer, d time.Duration) { return fc.waiters[i].expiry().Before(fc.waiters[j].expiry()) }) - // Notify blockers of our new waiter. + // Notify blockers of our new waiter. var blocked []*blocker count := len(fc.waiters) for _, b := range fc.blockers { diff --git a/new-components/reporters/json-logger/vendor/github.com/mattn/go-isatty/isatty_windows.go b/new-components/reporters/json-logger/vendor/github.com/mattn/go-isatty/isatty_windows.go index 8e3c99171..367adab99 100644 --- a/new-components/reporters/json-logger/vendor/github.com/mattn/go-isatty/isatty_windows.go +++ b/new-components/reporters/json-logger/vendor/github.com/mattn/go-isatty/isatty_windows.go @@ -42,7 +42,8 @@ func IsTerminal(fd uintptr) bool { // Check pipe name is used for cygwin/msys2 pty. // Cygwin/MSYS2 PTY has a name like: -// \{cygwin,msys}-XXXXXXXXXXXXXXXX-ptyN-{from,to}-master +// +// \{cygwin,msys}-XXXXXXXXXXXXXXXX-ptyN-{from,to}-master func isCygwinPipeName(name string) bool { token := strings.Split(name, "-") if len(token) < 5 { diff --git a/new-components/reporters/json-logger/vendor/github.com/mitchellh/copystructure/copystructure.go b/new-components/reporters/json-logger/vendor/github.com/mitchellh/copystructure/copystructure.go index 8089e6670..bf4b5df81 100644 --- a/new-components/reporters/json-logger/vendor/github.com/mitchellh/copystructure/copystructure.go +++ b/new-components/reporters/json-logger/vendor/github.com/mitchellh/copystructure/copystructure.go @@ -18,20 +18,19 @@ const tagKey = "copy" // // For structs, copy behavior can be controlled with struct tags. For example: // -// struct { -// Name string -// Data *bytes.Buffer `copy:"shallow"` -// } +// struct { +// Name string +// Data *bytes.Buffer `copy:"shallow"` +// } // // The available tag values are: // -// * "ignore" - The field will be ignored, effectively resulting in it being -// assigned the zero value in the copy. -// -// * "shallow" - The field will be be shallow copied. This means that references -// values such as pointers, maps, slices, etc. will be directly assigned -// versus deep copied. +// - "ignore" - The field will be ignored, effectively resulting in it being +// assigned the zero value in the copy. // +// - "shallow" - The field will be be shallow copied. This means that references +// values such as pointers, maps, slices, etc. will be directly assigned +// versus deep copied. func Copy(v interface{}) (interface{}, error) { return Config{}.Copy(v) } diff --git a/new-components/reporters/json-logger/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go b/new-components/reporters/json-logger/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go index 7fee7b050..2f7a976d6 100644 --- a/new-components/reporters/json-logger/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go +++ b/new-components/reporters/json-logger/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go @@ -81,7 +81,6 @@ type PointerValueWalker interface { // // - Struct: skips all fields from being walked // - StructField: skips walking the struct value -// var SkipEntry = errors.New("skip this entry") // Walk takes an arbitrary value and an interface and traverses the diff --git a/new-components/reporters/json-logger/vendor/github.com/pmezard/go-difflib/difflib/difflib.go b/new-components/reporters/json-logger/vendor/github.com/pmezard/go-difflib/difflib/difflib.go index 003e99fad..2a73737af 100644 --- a/new-components/reporters/json-logger/vendor/github.com/pmezard/go-difflib/difflib/difflib.go +++ b/new-components/reporters/json-logger/vendor/github.com/pmezard/go-difflib/difflib/difflib.go @@ -199,12 +199,15 @@ func (m *SequenceMatcher) isBJunk(s string) bool { // If IsJunk is not defined: // // Return (i,j,k) such that a[i:i+k] is equal to b[j:j+k], where -// alo <= i <= i+k <= ahi -// blo <= j <= j+k <= bhi +// +// alo <= i <= i+k <= ahi +// blo <= j <= j+k <= bhi +// // and for all (i',j',k') meeting those conditions, -// k >= k' -// i <= i' -// and if i == i', j <= j' +// +// k >= k' +// i <= i' +// and if i == i', j <= j' // // In other words, of all maximal matching blocks, return one that // starts earliest in a, and of all those maximal matching blocks that diff --git a/new-components/reporters/json-logger/vendor/github.com/russross/blackfriday/v2/doc.go b/new-components/reporters/json-logger/vendor/github.com/russross/blackfriday/v2/doc.go index 57ff152a0..2a5cc5b67 100644 --- a/new-components/reporters/json-logger/vendor/github.com/russross/blackfriday/v2/doc.go +++ b/new-components/reporters/json-logger/vendor/github.com/russross/blackfriday/v2/doc.go @@ -16,7 +16,7 @@ // If you're interested in calling Blackfriday from command line, see // https://github.com/russross/blackfriday-tool. // -// Sanitized Anchor Names +// # Sanitized Anchor Names // // Blackfriday includes an algorithm for creating sanitized anchor names // corresponding to a given input text. This algorithm is used to create diff --git a/new-components/reporters/json-logger/vendor/github.com/russross/blackfriday/v2/inline.go b/new-components/reporters/json-logger/vendor/github.com/russross/blackfriday/v2/inline.go index d45bd9417..e13d42572 100644 --- a/new-components/reporters/json-logger/vendor/github.com/russross/blackfriday/v2/inline.go +++ b/new-components/reporters/json-logger/vendor/github.com/russross/blackfriday/v2/inline.go @@ -735,7 +735,9 @@ func linkEndsWithEntity(data []byte, linkEnd int) bool { } // hasPrefixCaseInsensitive is a custom implementation of -// strings.HasPrefix(strings.ToLower(s), prefix) +// +// strings.HasPrefix(strings.ToLower(s), prefix) +// // we rolled our own because ToLower pulls in a huge machinery of lowercasing // anything from Unicode and that's very slow. Since this func will only be // used on ASCII protocol prefixes, we can take shortcuts. diff --git a/new-components/reporters/json-logger/vendor/github.com/russross/blackfriday/v2/markdown.go b/new-components/reporters/json-logger/vendor/github.com/russross/blackfriday/v2/markdown.go index 58d2e4538..382db9e9d 100644 --- a/new-components/reporters/json-logger/vendor/github.com/russross/blackfriday/v2/markdown.go +++ b/new-components/reporters/json-logger/vendor/github.com/russross/blackfriday/v2/markdown.go @@ -345,8 +345,8 @@ func WithNoExtensions() Option { // In Markdown, the link reference syntax can be made to resolve a link to // a reference instead of an inline URL, in one of the following ways: // -// * [link text][refid] -// * [refid][] +// - [link text][refid] +// - [refid][] // // Usually, the refid is defined at the bottom of the Markdown document. If // this override function is provided, the refid is passed to the override @@ -363,7 +363,9 @@ func WithRefOverride(o ReferenceOverrideFunc) Option { // block of markdown-encoded text. // // The simplest invocation of Run takes one argument, input: -// output := Run(input) +// +// output := Run(input) +// // This will parse the input with CommonExtensions enabled and render it with // the default HTMLRenderer (with CommonHTMLFlags). // @@ -371,13 +373,15 @@ func WithRefOverride(o ReferenceOverrideFunc) Option { // type does not contain exported fields, you can not use it directly. Instead, // use the With* functions. For example, this will call the most basic // functionality, with no extensions: -// output := Run(input, WithNoExtensions()) +// +// output := Run(input, WithNoExtensions()) // // You can use any number of With* arguments, even contradicting ones. They // will be applied in order of appearance and the latter will override the // former: -// output := Run(input, WithNoExtensions(), WithExtensions(exts), -// WithRenderer(yourRenderer)) +// +// output := Run(input, WithNoExtensions(), WithExtensions(exts), +// WithRenderer(yourRenderer)) func Run(input []byte, opts ...Option) []byte { r := NewHTMLRenderer(HTMLRendererParameters{ Flags: CommonHTMLFlags, @@ -491,35 +495,35 @@ func (p *Markdown) parseRefsToAST() { // // Consider this markdown with reference-style links: // -// [link][ref] +// [link][ref] // -// [ref]: /url/ "tooltip title" +// [ref]: /url/ "tooltip title" // // It will be ultimately converted to this HTML: // -//

link

+//

link

// // And a reference structure will be populated as follows: // -// p.refs["ref"] = &reference{ -// link: "/url/", -// title: "tooltip title", -// } +// p.refs["ref"] = &reference{ +// link: "/url/", +// title: "tooltip title", +// } // // Alternatively, reference can contain information about a footnote. Consider // this markdown: // -// Text needing a footnote.[^a] +// Text needing a footnote.[^a] // -// [^a]: This is the note +// [^a]: This is the note // // A reference structure will be populated as follows: // -// p.refs["a"] = &reference{ -// link: "a", -// title: "This is the note", -// noteID: , -// } +// p.refs["a"] = &reference{ +// link: "a", +// title: "This is the note", +// noteID: , +// } // // TODO: As you can see, it begs for splitting into two dedicated structures // for refs and for footnotes. diff --git a/new-components/reporters/json-logger/vendor/github.com/stretchr/testify/require/require.go b/new-components/reporters/json-logger/vendor/github.com/stretchr/testify/require/require.go index 506a82f80..1e5217ed4 100644 --- a/new-components/reporters/json-logger/vendor/github.com/stretchr/testify/require/require.go +++ b/new-components/reporters/json-logger/vendor/github.com/stretchr/testify/require/require.go @@ -3,10 +3,11 @@ package require import ( - assert "github.com/stretchr/testify/assert" http "net/http" url "net/url" time "time" + + assert "github.com/stretchr/testify/assert" ) // Condition uses a Comparison to assert a complex condition. diff --git a/new-components/reporters/json-logger/vendor/github.com/stretchr/testify/require/require_forward.go b/new-components/reporters/json-logger/vendor/github.com/stretchr/testify/require/require_forward.go index eee8310a5..c0b21eac7 100644 --- a/new-components/reporters/json-logger/vendor/github.com/stretchr/testify/require/require_forward.go +++ b/new-components/reporters/json-logger/vendor/github.com/stretchr/testify/require/require_forward.go @@ -3,10 +3,11 @@ package require import ( - assert "github.com/stretchr/testify/assert" http "net/http" url "net/url" time "time" + + assert "github.com/stretchr/testify/assert" ) // Condition uses a Comparison to assert a complex condition. diff --git a/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/element_iterator.go b/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/element_iterator.go index 62c9ea57c..ed8b0b3fb 100644 --- a/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/element_iterator.go +++ b/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/element_iterator.go @@ -11,11 +11,11 @@ import ( // // Its usage pattern is as follows: // -// it := val.ElementIterator() -// for it.Next() { -// key, val := it.Element() -// // ... -// } +// it := val.ElementIterator() +// for it.Next() { +// key, val := it.Element() +// // ... +// } type ElementIterator interface { Next() bool Element() (key Value, value Value) diff --git a/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/function/stdlib/datetime.go b/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/function/stdlib/datetime.go index 85f58d4cc..26c4545a0 100644 --- a/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/function/stdlib/datetime.go +++ b/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/function/stdlib/datetime.go @@ -243,30 +243,30 @@ var TimeAddFunc = function.New(&function.Spec{ // // The full set of supported mnemonic sequences is listed below: // -// YY Year modulo 100 zero-padded to two digits, like "06". -// YYYY Four (or more) digit year, like "2006". -// M Month number, like "1" for January. -// MM Month number zero-padded to two digits, like "01". -// MMM English month name abbreviated to three letters, like "Jan". -// MMMM English month name unabbreviated, like "January". -// D Day of month number, like "2". -// DD Day of month number zero-padded to two digits, like "02". -// EEE English day of week name abbreviated to three letters, like "Mon". -// EEEE English day of week name unabbreviated, like "Monday". -// h 24-hour number, like "2". -// hh 24-hour number zero-padded to two digits, like "02". -// H 12-hour number, like "2". -// HH 12-hour number zero-padded to two digits, like "02". -// AA Hour AM/PM marker in uppercase, like "AM". -// aa Hour AM/PM marker in lowercase, like "am". -// m Minute within hour, like "5". -// mm Minute within hour zero-padded to two digits, like "05". -// s Second within minute, like "9". -// ss Second within minute zero-padded to two digits, like "09". -// ZZZZ Timezone offset with just sign and digit, like "-0800". -// ZZZZZ Timezone offset with colon separating hours and minutes, like "-08:00". -// Z Like ZZZZZ but with a special case "Z" for UTC. -// ZZZ Like ZZZZ but with a special case "UTC" for UTC. +// YY Year modulo 100 zero-padded to two digits, like "06". +// YYYY Four (or more) digit year, like "2006". +// M Month number, like "1" for January. +// MM Month number zero-padded to two digits, like "01". +// MMM English month name abbreviated to three letters, like "Jan". +// MMMM English month name unabbreviated, like "January". +// D Day of month number, like "2". +// DD Day of month number zero-padded to two digits, like "02". +// EEE English day of week name abbreviated to three letters, like "Mon". +// EEEE English day of week name unabbreviated, like "Monday". +// h 24-hour number, like "2". +// hh 24-hour number zero-padded to two digits, like "02". +// H 12-hour number, like "2". +// HH 12-hour number zero-padded to two digits, like "02". +// AA Hour AM/PM marker in uppercase, like "AM". +// aa Hour AM/PM marker in lowercase, like "am". +// m Minute within hour, like "5". +// mm Minute within hour zero-padded to two digits, like "05". +// s Second within minute, like "9". +// ss Second within minute zero-padded to two digits, like "09". +// ZZZZ Timezone offset with just sign and digit, like "-0800". +// ZZZZZ Timezone offset with colon separating hours and minutes, like "-08:00". +// Z Like ZZZZZ but with a special case "Z" for UTC. +// ZZZ Like ZZZZ but with a special case "UTC" for UTC. // // The format syntax is optimized mainly for generating machine-oriented // timestamps rather than human-oriented timestamps; the English language diff --git a/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go b/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go index 2339cc33a..2135c6ae4 100644 --- a/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go +++ b/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go @@ -199,32 +199,32 @@ var FormatListFunc = function.New(&function.Spec{ // // It supports the following "verbs": // -// %% Literal percent sign, consuming no value -// %v A default formatting of the value based on type, as described below. -// %#v JSON serialization of the value -// %t Converts to boolean and then produces "true" or "false" -// %b Converts to number, requires integer, produces binary representation -// %d Converts to number, requires integer, produces decimal representation -// %o Converts to number, requires integer, produces octal representation -// %x Converts to number, requires integer, produces hexadecimal representation -// with lowercase letters -// %X Like %x but with uppercase letters -// %e Converts to number, produces scientific notation like -1.234456e+78 -// %E Like %e but with an uppercase "E" representing the exponent -// %f Converts to number, produces decimal representation with fractional -// part but no exponent, like 123.456 -// %g %e for large exponents or %f otherwise -// %G %E for large exponents or %f otherwise -// %s Converts to string and produces the string's characters -// %q Converts to string and produces JSON-quoted string representation, -// like %v. +// %% Literal percent sign, consuming no value +// %v A default formatting of the value based on type, as described below. +// %#v JSON serialization of the value +// %t Converts to boolean and then produces "true" or "false" +// %b Converts to number, requires integer, produces binary representation +// %d Converts to number, requires integer, produces decimal representation +// %o Converts to number, requires integer, produces octal representation +// %x Converts to number, requires integer, produces hexadecimal representation +// with lowercase letters +// %X Like %x but with uppercase letters +// %e Converts to number, produces scientific notation like -1.234456e+78 +// %E Like %e but with an uppercase "E" representing the exponent +// %f Converts to number, produces decimal representation with fractional +// part but no exponent, like 123.456 +// %g %e for large exponents or %f otherwise +// %G %E for large exponents or %f otherwise +// %s Converts to string and produces the string's characters +// %q Converts to string and produces JSON-quoted string representation, +// like %v. // // The default format selections made by %v are: // -// string %s -// number %g -// bool %t -// other %#v +// string %s +// number %g +// bool %t +// other %#v // // Null values produce the literal keyword "null" for %v and %#v, and produce // an error otherwise. @@ -236,10 +236,10 @@ var FormatListFunc = function.New(&function.Spec{ // is used. A period with no following number is invalid. // For examples: // -// %f default width, default precision -// %9f width 9, default precision -// %.2f default width, precision 2 -// %9.2f width 9, precision 2 +// %f default width, default precision +// %9f width 9, default precision +// %.2f default width, precision 2 +// %9.2f width 9, precision 2 // // Width and precision are measured in unicode characters (grapheme clusters). // @@ -256,10 +256,10 @@ var FormatListFunc = function.New(&function.Spec{ // The following additional symbols can be used immediately after the percent // introducer as flags: // -// (a space) leave a space where the sign would be if number is positive -// + Include a sign for a number even if it is positive (numeric only) -// - Pad with spaces on the left rather than the right -// 0 Pad with zeros rather than spaces. +// (a space) leave a space where the sign would be if number is positive +// + Include a sign for a number even if it is positive (numeric only) +// - Pad with spaces on the left rather than the right +// 0 Pad with zeros rather than spaces. // // Flag characters are ignored for verbs that do not support them. // diff --git a/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/gocty/in.go b/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/gocty/in.go index 6cb308b53..cd643d1fd 100644 --- a/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/gocty/in.go +++ b/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/gocty/in.go @@ -528,10 +528,10 @@ func toCtyPassthrough(wrappedVal reflect.Value, wantTy cty.Type, path cty.Path) // toCtyUnwrapPointer is a helper for dealing with Go pointers. It has three // possible outcomes: // -// - Given value isn't a pointer, so it's just returned as-is. -// - Given value is a non-nil pointer, in which case it is dereferenced -// and the result returned. -// - Given value is a nil pointer, in which case an invalid value is returned. +// - Given value isn't a pointer, so it's just returned as-is. +// - Given value is a non-nil pointer, in which case it is dereferenced +// and the result returned. +// - Given value is a nil pointer, in which case an invalid value is returned. // // For nested pointer types, like **int, they are all dereferenced in turn // until a non-pointer value is found, or until a nil pointer is encountered. diff --git a/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/list_type.go b/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/list_type.go index 2ef02a12f..f52ab8822 100644 --- a/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/list_type.go +++ b/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/list_type.go @@ -63,9 +63,9 @@ func (t Type) IsListType() bool { // otherwise. This is intended to allow convenient conditional branches, // like so: // -// if et := t.ListElementType(); et != nil { -// // Do something with *et -// } +// if et := t.ListElementType(); et != nil { +// // Do something with *et +// } func (t Type) ListElementType() *Type { if lt, ok := t.typeImpl.(typeList); ok { return <.ElementTypeT diff --git a/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/map_type.go b/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/map_type.go index 732c78a80..6ff67c633 100644 --- a/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/map_type.go +++ b/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/map_type.go @@ -63,9 +63,9 @@ func (t Type) IsMapType() bool { // otherwise. This is intended to allow convenient conditional branches, // like so: // -// if et := t.MapElementType(); et != nil { -// // Do something with *et -// } +// if et := t.MapElementType(); et != nil { +// // Do something with *et +// } func (t Type) MapElementType() *Type { if lt, ok := t.typeImpl.(typeMap); ok { return <.ElementTypeT diff --git a/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/set/ops.go b/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/set/ops.go index ffd950ac6..ea856f723 100644 --- a/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/set/ops.go +++ b/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/set/ops.go @@ -84,11 +84,11 @@ func (s Set[T]) Copy() Set[T] { // // The pattern for using the returned iterator is: // -// it := set.Iterator() -// for it.Next() { -// val := it.Value() -// // ... -// } +// it := set.Iterator() +// for it.Next() { +// val := it.Value() +// // ... +// } // // Once an iterator has been created for a set, the set *must not* be mutated // until the iterator is no longer in use. diff --git a/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/set_type.go b/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/set_type.go index cbc3706f2..1ac62e6b5 100644 --- a/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/set_type.go +++ b/new-components/reporters/json-logger/vendor/github.com/zclconf/go-cty/cty/set_type.go @@ -61,9 +61,9 @@ func (t Type) IsSetType() bool { // otherwise. This is intended to allow convenient conditional branches, // like so: // -// if et := t.SetElementType(); et != nil { -// // Do something with *et -// } +// if et := t.SetElementType(); et != nil { +// // Do something with *et +// } func (t Type) SetElementType() *Type { if lt, ok := t.typeImpl.(typeSet); ok { return <.ElementTypeT diff --git a/new-components/reporters/json-logger/vendor/golang.org/x/tools/cmd/cover/html.go b/new-components/reporters/json-logger/vendor/golang.org/x/tools/cmd/cover/html.go index 0f8c72542..d39c677b8 100644 --- a/new-components/reporters/json-logger/vendor/golang.org/x/tools/cmd/cover/html.go +++ b/new-components/reporters/json-logger/vendor/golang.org/x/tools/cmd/cover/html.go @@ -8,7 +8,6 @@ import ( "bufio" "bytes" "fmt" - exec "golang.org/x/sys/execabs" "html/template" "io" "io/ioutil" @@ -17,6 +16,8 @@ import ( "path/filepath" "runtime" + exec "golang.org/x/sys/execabs" + "golang.org/x/tools/cover" ) diff --git a/new-components/reporters/json-logger/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go b/new-components/reporters/json-logger/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go index 63c639e4f..63835cc77 100644 --- a/new-components/reporters/json-logger/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go +++ b/new-components/reporters/json-logger/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go @@ -25,12 +25,13 @@ package grpc_binarylog_v1 import ( + reflect "reflect" + sync "sync" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" ) const ( diff --git a/new-components/reporters/json-logger/vendor/google.golang.org/protobuf/internal/impl/merge_gen.go b/new-components/reporters/json-logger/vendor/google.golang.org/protobuf/internal/impl/merge_gen.go index 8816c274d..819826883 100644 --- a/new-components/reporters/json-logger/vendor/google.golang.org/protobuf/internal/impl/merge_gen.go +++ b/new-components/reporters/json-logger/vendor/google.golang.org/protobuf/internal/impl/merge_gen.go @@ -6,8 +6,6 @@ package impl -import () - func mergeBool(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { *dst.Bool() = *src.Bool() } diff --git a/new-components/reporters/json-logger/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go b/new-components/reporters/json-logger/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go index 87da199a3..1030bfbed 100644 --- a/new-components/reporters/json-logger/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go +++ b/new-components/reporters/json-logger/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go @@ -115,13 +115,14 @@ package anypb import ( + reflect "reflect" + strings "strings" + sync "sync" + proto "google.golang.org/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoregistry "google.golang.org/protobuf/reflect/protoregistry" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - strings "strings" - sync "sync" ) // `Any` contains an arbitrary serialized protocol buffer message along with a diff --git a/new-components/reporters/json-logger/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go b/new-components/reporters/json-logger/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go index b99d4d241..d774511a7 100644 --- a/new-components/reporters/json-logger/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go +++ b/new-components/reporters/json-logger/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go @@ -74,12 +74,13 @@ package durationpb import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" math "math" reflect "reflect" sync "sync" time "time" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) // A Duration represents a signed, fixed-length span of time represented diff --git a/new-components/reporters/json-logger/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go b/new-components/reporters/json-logger/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go index 8f206a661..e2a73a220 100644 --- a/new-components/reporters/json-logger/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go +++ b/new-components/reporters/json-logger/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go @@ -121,13 +121,14 @@ package structpb import ( base64 "encoding/base64" json "encoding/json" - protojson "google.golang.org/protobuf/encoding/protojson" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" math "math" reflect "reflect" sync "sync" utf8 "unicode/utf8" + + protojson "google.golang.org/protobuf/encoding/protojson" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) // `NullValue` is a singleton enumeration to represent the null value for the diff --git a/new-components/reporters/json-logger/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go b/new-components/reporters/json-logger/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go index 0d20722d7..b2402b523 100644 --- a/new-components/reporters/json-logger/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go +++ b/new-components/reporters/json-logger/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go @@ -73,11 +73,12 @@ package timestamppb import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" time "time" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) // A Timestamp represents a point in time independent of any time zone or local diff --git a/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/apic.go b/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/apic.go index ae7d049f1..05fd305da 100644 --- a/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/apic.go +++ b/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/apic.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/emitterc.go b/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/emitterc.go index 0f47c9ca8..dde20e507 100644 --- a/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/emitterc.go +++ b/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/emitterc.go @@ -162,10 +162,9 @@ func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool { // Check if we need to accumulate more events before emitting. // // We accumulate extra -// - 1 event for DOCUMENT-START -// - 2 events for SEQUENCE-START -// - 3 events for MAPPING-START -// +// - 1 event for DOCUMENT-START +// - 2 events for SEQUENCE-START +// - 3 events for MAPPING-START func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool { if emitter.events_head == len(emitter.events) { return true @@ -241,7 +240,7 @@ func yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentless bool emitter.indent += 2 } else { // Everything else aligns to the chosen indentation. - emitter.indent = emitter.best_indent*((emitter.indent+emitter.best_indent)/emitter.best_indent) + emitter.indent = emitter.best_indent * ((emitter.indent + emitter.best_indent) / emitter.best_indent) } } return true diff --git a/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/parserc.go b/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/parserc.go index 268558a0d..25fe82363 100644 --- a/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/parserc.go +++ b/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/parserc.go @@ -227,7 +227,8 @@ func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool // Parse the production: // stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// ************ +// +// ************ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -249,9 +250,12 @@ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// * +// +// * +// // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// ************************* +// +// ************************* func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool { token := peek_token(parser) @@ -356,8 +360,8 @@ func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t // Parse the productions: // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// *********** // +// *********** func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -379,9 +383,10 @@ func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// ************* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* // +// ************* +// +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -428,30 +433,41 @@ func yaml_parser_set_event_comments(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // block_node_or_indentless_sequence ::= -// ALIAS -// ***** -// | properties (block_content | indentless_block_sequence)? -// ********** * -// | block_content | indentless_block_sequence -// * +// +// ALIAS +// ***** +// | properties (block_content | indentless_block_sequence)? +// ********** * +// | block_content | indentless_block_sequence +// * +// // block_node ::= ALIAS -// ***** -// | properties block_content? -// ********** * -// | block_content -// * +// +// ***** +// | properties block_content? +// ********** * +// | block_content +// * +// // flow_node ::= ALIAS -// ***** -// | properties flow_content? -// ********** * -// | flow_content -// * +// +// ***** +// | properties flow_content? +// ********** * +// | flow_content +// * +// // properties ::= TAG ANCHOR? | ANCHOR TAG? -// ************************* +// +// ************************* +// // block_content ::= block_collection | flow_collection | SCALAR -// ****** +// +// ****** +// // flow_content ::= flow_collection | SCALAR -// ****** +// +// ****** func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool { //defer trace("yaml_parser_parse_node", "block:", block, "indentless_sequence:", indentless_sequence)() @@ -682,8 +698,8 @@ func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, i // Parse the productions: // block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// ******************** *********** * ********* // +// ******************** *********** * ********* func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -740,7 +756,8 @@ func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_e // Parse the productions: // indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// *********** * +// +// *********** * func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -805,14 +822,14 @@ func yaml_parser_split_stem_comment(parser *yaml_parser_t, stem_len int) { // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START -// ******************* -// ((KEY block_node_or_indentless_sequence?)? -// *** * -// (VALUE block_node_or_indentless_sequence?)?)* // -// BLOCK-END -// ********* +// ******************* +// ((KEY block_node_or_indentless_sequence?)? +// *** * +// (VALUE block_node_or_indentless_sequence?)?)* // +// BLOCK-END +// ********* func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -881,13 +898,11 @@ func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_even // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START // -// ((KEY block_node_or_indentless_sequence?)? -// -// (VALUE block_node_or_indentless_sequence?)?)* -// ***** * -// BLOCK-END -// +// ((KEY block_node_or_indentless_sequence?)? // +// (VALUE block_node_or_indentless_sequence?)?)* +// ***** * +// BLOCK-END func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -915,16 +930,18 @@ func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_ev // Parse the productions: // flow_sequence ::= FLOW-SEQUENCE-START -// ******************* -// (flow_sequence_entry FLOW-ENTRY)* -// * ********** -// flow_sequence_entry? -// * -// FLOW-SEQUENCE-END -// ***************** +// +// ******************* +// (flow_sequence_entry FLOW-ENTRY)* +// * ********** +// flow_sequence_entry? +// * +// FLOW-SEQUENCE-END +// ***************** +// // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -987,11 +1004,10 @@ func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_ev return true } -// // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// *** * // +// *** * func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -1011,8 +1027,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, ev // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// ***** * // +// ***** * func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -1035,8 +1051,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -1053,16 +1069,17 @@ func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, ev // Parse the productions: // flow_mapping ::= FLOW-MAPPING-START -// ****************** -// (flow_mapping_entry FLOW-ENTRY)* -// * ********** -// flow_mapping_entry? -// ****************** -// FLOW-MAPPING-END -// **************** -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * *** * // +// ****************** +// (flow_mapping_entry FLOW-ENTRY)* +// * ********** +// flow_mapping_entry? +// ****************** +// FLOW-MAPPING-END +// **************** +// +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// - *** * func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -1128,8 +1145,7 @@ func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event // Parse the productions: // flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * ***** * -// +// - ***** * func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { token := peek_token(parser) if token == nil { diff --git a/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/readerc.go b/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/readerc.go index b7de0a89c..56af24536 100644 --- a/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/readerc.go +++ b/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/readerc.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/scannerc.go b/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/scannerc.go index ca0070108..30b1f0892 100644 --- a/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/scannerc.go +++ b/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/scannerc.go @@ -1614,11 +1614,11 @@ func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool { // Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %YAML 1.1 # a comment \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool { // Eat '%'. start_mark := parser.mark @@ -1719,11 +1719,11 @@ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool // Scan the directive name. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^ // +// %YAML 1.1 # a comment \n +// ^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool { // Consume the directive name. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1758,8 +1758,9 @@ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark // Scan the value of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^ +// +// %YAML 1.1 # a comment \n +// ^^^^^^ func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool { // Eat whitespaces. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1797,10 +1798,11 @@ const max_number_length = 2 // Scan the version number of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^ -// %YAML 1.1 # a comment \n -// ^ +// +// %YAML 1.1 # a comment \n +// ^ +// %YAML 1.1 # a comment \n +// ^ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool { // Repeat while the next character is digit. @@ -1834,9 +1836,9 @@ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark // Scan the value of a TAG-DIRECTIVE token. // // Scope: -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool { var handle_value, prefix_value []byte @@ -2847,7 +2849,7 @@ func yaml_parser_scan_line_comment(parser *yaml_parser_t, token_mark yaml_mark_t continue } if parser.buffer[parser.buffer_pos+peek] == '#' { - seen := parser.mark.index+peek + seen := parser.mark.index + peek for { if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { return false @@ -2876,7 +2878,7 @@ func yaml_parser_scan_line_comment(parser *yaml_parser_t, token_mark yaml_mark_t parser.comments = append(parser.comments, yaml_comment_t{ token_mark: token_mark, start_mark: start_mark, - line: text, + line: text, }) } return true @@ -2910,7 +2912,7 @@ func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) boo // the foot is the line below it. var foot_line = -1 if scan_mark.line > 0 { - foot_line = parser.mark.line-parser.newlines+1 + foot_line = parser.mark.line - parser.newlines + 1 if parser.newlines == 0 && parser.mark.column > 1 { foot_line++ } @@ -2996,7 +2998,7 @@ func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) boo recent_empty = false // Consume until after the consumed comment line. - seen := parser.mark.index+peek + seen := parser.mark.index + peek for { if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { return false diff --git a/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/writerc.go b/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/writerc.go index b8a116bf9..266d0b092 100644 --- a/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/writerc.go +++ b/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/writerc.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/yaml.go b/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/yaml.go index 8cec6da48..f0bedf3d6 100644 --- a/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/yaml.go +++ b/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/yaml.go @@ -17,8 +17,7 @@ // // Source code and other details for the project are available at GitHub: // -// https://github.com/go-yaml/yaml -// +// https://github.com/go-yaml/yaml package yaml import ( @@ -75,16 +74,15 @@ type Marshaler interface { // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// var t T -// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// var t T +// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) // // See the documentation of Marshal for the format of tags and a list of // supported tag options. -// func Unmarshal(in []byte, out interface{}) (err error) { return unmarshal(in, out, false) } @@ -185,36 +183,35 @@ func unmarshal(in []byte, out interface{}, strict bool) (err error) { // // The field tag format accepted is: // -// `(...) yaml:"[][,[,]]" (...)` +// `(...) yaml:"[][,[,]]" (...)` // // The following flags are currently supported: // -// omitempty Only include the field if it's not set to the zero -// value for the type or to empty slices or maps. -// Zero valued structs will be omitted if all their public -// fields are zero, unless they implement an IsZero -// method (see the IsZeroer interface type), in which -// case the field will be excluded if IsZero returns true. +// omitempty Only include the field if it's not set to the zero +// value for the type or to empty slices or maps. +// Zero valued structs will be omitted if all their public +// fields are zero, unless they implement an IsZero +// method (see the IsZeroer interface type), in which +// case the field will be excluded if IsZero returns true. // -// flow Marshal using a flow style (useful for structs, -// sequences and maps). +// flow Marshal using a flow style (useful for structs, +// sequences and maps). // -// inline Inline the field, which must be a struct or a map, -// causing all of its fields or keys to be processed as if -// they were part of the outer struct. For maps, keys must -// not conflict with the yaml keys of other struct fields. +// inline Inline the field, which must be a struct or a map, +// causing all of its fields or keys to be processed as if +// they were part of the outer struct. For maps, keys must +// not conflict with the yaml keys of other struct fields. // // In addition, if the key is "-", the field is ignored. // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" -// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" -// +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" +// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" func Marshal(in interface{}) (out []byte, err error) { defer handleErr(&err) e := newEncoder() @@ -358,22 +355,21 @@ const ( // // For example: // -// var person struct { -// Name string -// Address yaml.Node -// } -// err := yaml.Unmarshal(data, &person) -// -// Or by itself: +// var person struct { +// Name string +// Address yaml.Node +// } +// err := yaml.Unmarshal(data, &person) // -// var person Node -// err := yaml.Unmarshal(data, &person) +// Or by itself: // +// var person Node +// err := yaml.Unmarshal(data, &person) type Node struct { // Kind defines whether the node is a document, a mapping, a sequence, // a scalar value, or an alias to another node. The specific data type of // scalar nodes may be obtained via the ShortTag and LongTag methods. - Kind Kind + Kind Kind // Style allows customizing the apperance of the node in the tree. Style Style @@ -421,7 +417,6 @@ func (n *Node) IsZero() bool { n.HeadComment == "" && n.LineComment == "" && n.FootComment == "" && n.Line == 0 && n.Column == 0 } - // LongTag returns the long form of the tag that indicates the data type for // the node. If the Tag field isn't explicitly defined, one will be computed // based on the node properties. diff --git a/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/yamlh.go b/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/yamlh.go index 7c6d00770..ddcd5513b 100644 --- a/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/yamlh.go +++ b/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/yamlh.go @@ -438,7 +438,9 @@ type yaml_document_t struct { // The number of written bytes should be set to the size_read variable. // // [in,out] data A pointer to an application data specified by -// yaml_parser_set_input(). +// +// yaml_parser_set_input(). +// // [out] buffer The buffer to write the data from the source. // [in] size The size of the buffer. // [out] size_read The actual number of bytes read from the source. @@ -639,7 +641,6 @@ type yaml_parser_t struct { } type yaml_comment_t struct { - scan_mark yaml_mark_t // Position where scanning for comments started token_mark yaml_mark_t // Position after which tokens will be associated with this comment start_mark yaml_mark_t // Position of '#' comment mark @@ -659,13 +660,14 @@ type yaml_comment_t struct { // @a buffer to the output. // // @param[in,out] data A pointer to an application data specified by -// yaml_emitter_set_output(). +// +// yaml_emitter_set_output(). +// // @param[in] buffer The buffer with bytes to be written. // @param[in] size The size of the buffer. // // @returns On success, the handler should return @c 1. If the handler failed, // the returned value should be @c 0. -// type yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error type yaml_emitter_state_t int diff --git a/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/yamlprivateh.go b/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/yamlprivateh.go index e88f9c54a..dea1ba961 100644 --- a/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/yamlprivateh.go +++ b/new-components/reporters/json-logger/vendor/gopkg.in/yaml.v3/yamlprivateh.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -137,8 +137,8 @@ func is_crlf(b []byte, i int) bool { func is_breakz(b []byte, i int) bool { //return is_break(b, i) || is_z(b, i) return ( - // is_break: - b[i] == '\r' || // CR (#xD) + // is_break: + b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) @@ -151,8 +151,8 @@ func is_breakz(b []byte, i int) bool { func is_spacez(b []byte, i int) bool { //return is_space(b, i) || is_breakz(b, i) return ( - // is_space: - b[i] == ' ' || + // is_space: + b[i] == ' ' || // is_breakz: b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) @@ -166,8 +166,8 @@ func is_spacez(b []byte, i int) bool { func is_blankz(b []byte, i int) bool { //return is_blank(b, i) || is_breakz(b, i) return ( - // is_blank: - b[i] == ' ' || b[i] == '\t' || + // is_blank: + b[i] == ' ' || b[i] == '\t' || // is_breakz: b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) diff --git a/new-components/scanners/bandit/cmd/main.go b/new-components/scanners/bandit/cmd/main.go index 8d6014bee..bf34ea452 100644 --- a/new-components/scanners/bandit/cmd/main.go +++ b/new-components/scanners/bandit/cmd/main.go @@ -9,7 +9,7 @@ import ( "github.com/smithy-security/smithy/sdk/component" - "github.com/smithy-security/smithy/new-components/scanners/gosec/internal/transformer" + "github.com/smithy-security/smithy/new-components/scanners/bandit/internal/transformer" ) func main() { diff --git a/new-components/scanners/bandit/go.mod b/new-components/scanners/bandit/go.mod index cf9c2cce9..0e82ea96b 100644 --- a/new-components/scanners/bandit/go.mod +++ b/new-components/scanners/bandit/go.mod @@ -2,6 +2,15 @@ module github.com/smithy-security/smithy/new-components/scanners/bandit go 1.23.3 +require ( + github.com/go-errors/errors v1.5.1 + github.com/jonboulle/clockwork v0.4.0 + github.com/smithy-security/pkg/env v0.0.1 + github.com/smithy-security/smithy/sdk v0.0.3-alpha + github.com/stretchr/testify v1.10.0 + google.golang.org/protobuf v1.35.1 +) + require ( ariga.io/atlas v0.29.0 // indirect dario.cat/mergo v1.0.1 // indirect @@ -14,7 +23,6 @@ require ( github.com/bmatcuk/doublestar v1.3.4 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-errors/errors v1.5.1 // indirect github.com/go-openapi/inflect v0.19.0 // indirect github.com/golang/mock v1.6.0 // indirect github.com/google/go-cmp v0.6.0 // indirect @@ -24,7 +32,6 @@ require ( github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect github.com/jackc/pgx/v5 v5.6.0 // indirect - github.com/jonboulle/clockwork v0.4.0 // indirect github.com/labstack/gommon v0.4.2 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect @@ -32,18 +39,12 @@ require ( github.com/mattn/goveralls v0.0.12 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/shopspring/decimal v1.4.0 // indirect - github.com/smithy-security/pkg/env v0.0.1 // indirect - github.com/smithy-security/pkg/sarif v0.0.1 // indirect - github.com/smithy-security/smithy/new-components/scanners/gosec v0.0.0-20241219103715-6b0009986450 // indirect - github.com/smithy-security/smithy/sdk v0.0.3-alpha // indirect github.com/spf13/cast v1.7.0 // indirect github.com/sqlc-dev/sqlc v1.27.0 // indirect - github.com/stretchr/testify v1.10.0 // indirect github.com/urfave/cli/v2 v2.27.5 // indirect github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect github.com/zclconf/go-cty v1.14.4 // indirect @@ -58,6 +59,5 @@ require ( golang.org/x/tools/cmd/cover v0.1.0-deprecated // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect google.golang.org/grpc v1.65.0 // indirect - google.golang.org/protobuf v1.35.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/new-components/scanners/bandit/go.sum b/new-components/scanners/bandit/go.sum index 8719ac7d5..577b04541 100644 --- a/new-components/scanners/bandit/go.sum +++ b/new-components/scanners/bandit/go.sum @@ -2,12 +2,20 @@ ariga.io/atlas v0.29.0 h1:sXlI6ktGjo0vpBDvStjtgEKwLvjFfveK0vmRRTxyu1E= ariga.io/atlas v0.29.0/go.mod h1:LOOp18LCL9r+VifvVlJqgYJwYl271rrXD9/wIyzJ8sw= dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= +github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver/v3 v3.3.1 h1:QtNSWtVZ3nBfk8mAOu/B6v7FMJ+NHTIgUPi7rj+4nv4= github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs= github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/abice/go-enum v0.6.0 h1:J6xiV+nyu/D5c5+/rQfgkMi9zJ1Hkap8clxCZf8KNsk= github.com/abice/go-enum v0.6.0/go.mod h1:istq/zbgIh0kwEdbwHb+t8OS5dsB7w4w4VygV6HcpLg= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= @@ -16,19 +24,41 @@ github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= github.com/bmatcuk/doublestar v1.3.4 h1:gPypJ5xD31uhX6Tf54sDPUOBXTqKH4c9aPY66CyQrS0= github.com/bmatcuk/doublestar v1.3.4/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE= +github.com/bradleyjkemp/cupaloy/v2 v2.8.0 h1:any4BmKE+jGIaMpnU8YgH/I2LPiLBufr6oMMlVBbn9M= +github.com/bradleyjkemp/cupaloy/v2 v2.8.0/go.mod h1:bm7JXdkRd4BHJk9HpwqAI8BoAY1lps46Enkdqw6aRX0= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8= +github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc= github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/docker/cli v26.1.4+incompatible h1:I8PHdc0MtxEADqYJZvhBrW9bo8gawKwwenxRM7/rLu8= +github.com/docker/cli v26.1.4+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/docker v27.1.1+incompatible h1:hO/M4MtV36kzKldqnA37IWhebRA+LnqqcqDja6kVaKY= +github.com/docker/docker v27.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk= github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNPXu/4= github.com/go-openapi/inflect v0.19.0/go.mod h1:lHpZVlpIQqLyKwJ4N+YSc9hchQy/i12fJykb83CRBH4= +github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= +github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hashicorp/hcl/v2 v2.18.1 h1:6nxnOJFku1EuSawSD81fuviYUV8DxFr3fp2dUi3ZYSo= @@ -41,8 +71,16 @@ github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/ github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= github.com/jackc/pgx/v5 v5.6.0 h1:SWJzexBzPL5jb0GEsrPMLIsi/3jOo7RHlzTjcAeDrPY= github.com/jackc/pgx/v5 v5.6.0/go.mod h1:DNZ/vlrUnhWCoFGxHAG8U2ljioxukquj7utPDgtQdTw= +github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= +github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0= github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -62,18 +100,34 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= +github.com/opencontainers/runc v1.1.13 h1:98S2srgG9vw0zWcDpFMn5TRrh8kLxa/5OFUstuUhmRs= +github.com/opencontainers/runc v1.1.13/go.mod h1:R016aXacfp/gwQBYw2FDGa9m+n6atbLWrYY8hNMT/sA= +github.com/ory/dockertest/v3 v3.11.0 h1:OiHcxKAvSDUwsEVh2BjxQQc/5EHz9n0va9awCtNGuyA= +github.com/ory/dockertest/v3 v3.11.0/go.mod h1:VIPxS1gwT9NpPOrfD3rACs8Y9Z7yhzO4SB194iUDnUI= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smithy-security/pkg/env v0.0.1 h1:uwLTMLdNN/dv3x4zat75JahEBQDpdBeldjEE8El4OiM= github.com/smithy-security/pkg/env v0.0.1/go.mod h1:VIJfDqeAbQQcmohaXcZI6grjeJC9Y8CmqR4ITpdngZE= -github.com/smithy-security/pkg/sarif v0.0.1 h1:iZDtYBzUKbQlDCli0x8ZSaTt3+2WYoryFVrhS6/1v3c= -github.com/smithy-security/pkg/sarif v0.0.1/go.mod h1:+zGyJKSH8xfpcHvJEsDp47lWCtfmePuKF51cshOydZo= -github.com/smithy-security/smithy/new-components/scanners/gosec v0.0.0-20241219103715-6b0009986450 h1:QmPR3+iSQ7fnCSIiizbBd1ctUlKe3qSKJUw9PbyovqY= -github.com/smithy-security/smithy/new-components/scanners/gosec v0.0.0-20241219103715-6b0009986450/go.mod h1:EQo+NUKL9mBRwNLducpjKtC/7CX9d0uOakGUIn0uaCg= github.com/smithy-security/smithy/sdk v0.0.3-alpha h1:OgDtDI8B8NM0m80y7pMzs0MdcAO6aNrtPIJjXAR1PZc= github.com/smithy-security/smithy/sdk v0.0.3-alpha/go.mod h1:nqbB1JZR1WnKR57YqKU3iFzp8cNDYUY8oErMdsM9KLI= github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= @@ -87,6 +141,12 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/urfave/cli/v2 v2.27.5 h1:WoHEJLdsXr6dDWoJgMq/CboDmyY/8HMMH1fTECbih+w= github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4= github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= @@ -166,6 +226,10 @@ google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjr google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/new-components/scanners/bandit/vendor/ariga.io/atlas/LICENSE b/new-components/scanners/bandit/vendor/ariga.io/atlas/LICENSE new file mode 100644 index 000000000..7a4a3ea24 --- /dev/null +++ b/new-components/scanners/bandit/vendor/ariga.io/atlas/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/new-components/scanners/bandit/vendor/ariga.io/atlas/schemahcl/context.go b/new-components/scanners/bandit/vendor/ariga.io/atlas/schemahcl/context.go new file mode 100644 index 000000000..5790ea9f8 --- /dev/null +++ b/new-components/scanners/bandit/vendor/ariga.io/atlas/schemahcl/context.go @@ -0,0 +1,504 @@ +// Copyright 2021-present The Atlas Authors. All rights reserved. +// This source code is licensed under the Apache 2.0 license found +// in the LICENSE file in the root directory of this source tree. + +package schemahcl + +import ( + "context" + "fmt" + "reflect" + "strconv" + "strings" + + "github.com/hashicorp/hcl/v2" + "github.com/hashicorp/hcl/v2/gohcl" + "github.com/hashicorp/hcl/v2/hclsyntax" + "github.com/zclconf/go-cty/cty" + "github.com/zclconf/go-cty/cty/convert" +) + +// blockVar is an HCL resource that defines an input variable to the Atlas DDL document. +type blockVar struct { + Name string `hcl:",label"` + Type cty.Value `hcl:"type"` + Default cty.Value `hcl:"default,optional"` + Description string `hcl:"description,optional"` +} + +// setInputVals sets the input values into the evaluation context. HCL documents can define +// input variables in the document body by defining "variable" blocks: +// +// variable "name" { +// type = string // also supported: number, bool +// default = "rotemtam" +// } +func (s *State) setInputVals(ctx *hcl.EvalContext, body hcl.Body, input map[string]cty.Value) error { + var doc struct { + Vars []*blockVar `hcl:"variable,block"` + Remain hcl.Body `hcl:",remain"` + } + if diag := gohcl.DecodeBody(body, ctx, &doc); diag.HasErrors() { + return diag + } + ctxVars := make(map[string]cty.Value) + for _, v := range doc.Vars { + var vv cty.Value + switch iv, ok := input[v.Name]; { + case !v.Type.Type().IsCapsuleType(): + return fmt.Errorf( + "invalid type %q for variable %q. Valid types are: string, number, bool, list, map, or set", + v.Type.AsString(), v.Name, + ) + case ok: + vv = iv + case v.Default != cty.NilVal: + vv = v.Default + default: + return fmt.Errorf("missing value for required variable %q", v.Name) + } + vt := v.Type.EncapsulatedValue().(*cty.Type) + // In case the input value is a primitive type and the expected type is a list, + // wrap it as a list because the variable type may not be known to the caller. + if vt.IsListType() && vv.Type().Equals(vt.ElementType()) { + vv = cty.ListVal([]cty.Value{vv}) + } + cv, err := convert.Convert(vv, *vt) + if err != nil { + return fmt.Errorf("variable %q: %w", v.Name, err) + } + ctxVars[v.Name] = cv + } + mergeCtxVar(ctx, ctxVars) + return nil +} + +// evalReferences evaluates local and data blocks. +func (s *State) evalReferences(ctx *hcl.EvalContext, body *hclsyntax.Body) error { + type node struct { + addr [3]string + edges func() []hcl.Traversal + value func() (cty.Value, error) + } + var ( + initblk []*node + goctx = s.config.ctx + typeblk = make(map[string]bool) + nodes = make(map[[3]string]*node) + blocks = make(hclsyntax.Blocks, 0, len(body.Blocks)) + ) + if goctx == nil { + goctx = context.Background() + } + for _, b := range body.Blocks { + switch b := b; { + case b.Type == BlockData: + if len(b.Labels) < 2 { + return fmt.Errorf("data block %q must have exactly 2 labels", b.Type) + } + h, ok := s.config.datasrc[b.Labels[0]] + if !ok { + return fmt.Errorf("missing data source handler for %q", b.Labels[0]) + } + // Data references are combined from + // "data", "source" and "name" labels. + addr := [3]string{RefData, b.Labels[0], b.Labels[1]} + nodes[addr] = &node{ + addr: addr, + value: func() (cty.Value, error) { return h(goctx, ctx, b) }, + edges: func() []hcl.Traversal { return bodyVars(b.Body) }, + } + case b.Type == BlockLocals: + for k, v := range b.Body.Attributes { + k, v := k, v + // Local references are combined from + // "local" and "name" labels. + addr := [3]string{RefLocal, k, ""} + nodes[addr] = &node{ + addr: addr, + edges: func() []hcl.Traversal { return hclsyntax.Variables(v.Expr) }, + value: func() (cty.Value, error) { + v, diags := v.Expr.Value(ctx) + if diags.HasErrors() { + return cty.NilVal, diags + } + return v, nil + }, + } + } + case s.config.initblk[b.Type] != nil: + if len(b.Labels) != 0 { + return fmt.Errorf("init block %q cannot have labels", b.Type) + } + addr := [3]string{b.Type, "", ""} + if nodes[addr] != nil { + return fmt.Errorf("duplicate init block %q", b.Type) + } + h := s.config.initblk[b.Type] + n := &node{ + addr: addr, + value: func() (cty.Value, error) { return h(goctx, ctx, b) }, + edges: func() []hcl.Traversal { return bodyVars(b.Body) }, + } + nodes[addr] = n + initblk = append(initblk, n) + case s.config.typedblk[b.Type] != nil: + typeblk[b.Type] = true + if len(b.Labels) < 2 { + return fmt.Errorf("%s block must have exactly 2 labels", b.Type) + } + k, ok := s.config.typedblk[b.Type] + if !ok || k[b.Labels[0]] == nil { + return fmt.Errorf("missing %s block handler for %q", b.Type, b.Labels[0]) + } + h := k[b.Labels[0]] + // Typed block references are combined from + // "", "