format and comment
This commit is contained in:
parent
398de10777
commit
a92113e341
4 changed files with 12 additions and 12 deletions
|
|
@ -5,21 +5,24 @@ import (
|
|||
"regexp"
|
||||
)
|
||||
|
||||
// TrimNewlines removes a whitespace in the end of string (don't stop on linebreak)
|
||||
func TrimNewlines(input string) string {
|
||||
var re = regexp.MustCompile(`(?m)[ \t]*$`)
|
||||
return re.ReplaceAllString(input, "")
|
||||
}
|
||||
|
||||
// Amount of seconds that a signature may be created after the verify time
|
||||
// Consistent with the 2 day slack allowed in the ProtonMail Email Parser
|
||||
// CreationTimeOffset stores amount of seconds that a signature may be created
|
||||
// after the verify time Consistent with the 2 day slack allowed in the
|
||||
// ProtonMail Email Parser
|
||||
const CreationTimeOffset = int64(60 * 60 * 24 * 2)
|
||||
|
||||
const (
|
||||
ARMOR_HEADER_VERSION = "Pmcrypto Golang 0.0.1 (" + constants.VERSION + ")"
|
||||
ARMOR_HEADER_COMMENT = "https://protonmail.com"
|
||||
armorHeaderVersion = "Pmcrypto Golang 0.0.1 (" + constants.VERSION + ")"
|
||||
armorHeaderComment = "https://protonmail.com"
|
||||
)
|
||||
|
||||
// ArmorHeaders from golang pm-crypto
|
||||
var ArmorHeaders = map[string]string{
|
||||
"Version": ARMOR_HEADER_VERSION,
|
||||
"Comment": ARMOR_HEADER_COMMENT,
|
||||
"Version": armorHeaderVersion,
|
||||
"Comment": armorHeaderComment,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue