mirror of
https://github.com/adnanh/webhook.git
synced 2026-07-26 08:39:17 +08:00
fix: Trim the cat output (#720)
`os.ReadFile` includes a trailing EOL, so we have to remove it to get the correct value
This commit is contained in:
@@ -970,7 +970,7 @@ func cat(s string) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
return string(data)
|
return strings.TrimSuffix(string(data), "\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
// credential provides a template function to retreive secrets using systemd's LoadCredential mechanism
|
// credential provides a template function to retreive secrets using systemd's LoadCredential mechanism
|
||||||
|
|||||||
Reference in New Issue
Block a user