add trim leading function
This commit is contained in:
parent
efc003288c
commit
701f1bc60a
3 changed files with 23 additions and 1 deletions
|
|
@ -1,5 +1,9 @@
|
|||
package pm
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
)
|
||||
|
||||
var armorHeader = map[string]string{
|
||||
"Version": "OpenPGP Golang 0.0.1 (" + Version() + ")",
|
||||
"Comment": "https://protonmail.com",
|
||||
|
|
@ -21,3 +25,8 @@ type Address struct {
|
|||
// address_name : string;
|
||||
keys []Key
|
||||
}
|
||||
|
||||
func trimNewlines(input string) string {
|
||||
var re = regexp.MustCompile(`(?m)[ \t]*$`)
|
||||
return re.ReplaceAllString(input, "")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue