mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
make fmt
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
This commit is contained in:
parent
ef9e9ec9ac
commit
836d88191d
1 changed files with 2 additions and 2 deletions
|
@ -247,7 +247,7 @@ func parseMultilineBlockBody(m map[string]interface{}) map[string]interface{} {
|
|||
switch typedValue := v.(type) {
|
||||
case string:
|
||||
trimmedTypedValue := strings.Trim(typedValue, "\n")
|
||||
if !pemFormat(trimmedTypedValue) && strings.Contains(trimmedTypedValue, "\n") {
|
||||
if !pemFormat(trimmedTypedValue) && strings.Contains(trimmedTypedValue, "\n") {
|
||||
m[k] = strings.Split(trimmedTypedValue, "\n")
|
||||
} else {
|
||||
m[k] = trimmedTypedValue // trimming a str if it has trailing newline characters
|
||||
|
@ -262,4 +262,4 @@ func parseMultilineBlockBody(m map[string]interface{}) map[string]interface{} {
|
|||
// check for PEM header found in certs and public keys
|
||||
func pemFormat(s string) bool {
|
||||
return strings.Contains(s, "-----BEGIN")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue