зеркало из https://github.com/mozilla/libaudit-go.git
correct spelling for fixPunctuations
This commit is contained in:
Родитель
909b2c086a
Коммит
6e4cfa3119
10
parser.go
10
parser.go
|
@ -104,7 +104,7 @@ func ParseAuditEvent(str string, msgType auditConstant, interpret bool) (*AuditE
|
||||||
}
|
}
|
||||||
value = v
|
value = v
|
||||||
m[key] = value
|
m[key] = value
|
||||||
fixPunctuantions(&value)
|
fixPunctuations(&value)
|
||||||
if len(str) == len(nBytes) {
|
if len(str) == len(nBytes) {
|
||||||
//reached the end of message
|
//reached the end of message
|
||||||
break
|
break
|
||||||
|
@ -120,13 +120,13 @@ func ParseAuditEvent(str string, msgType auditConstant, interpret bool) (*AuditE
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
value += " " + nBytes
|
value += " " + nBytes
|
||||||
fixPunctuantions(&value)
|
fixPunctuations(&value)
|
||||||
m[key] = value
|
m[key] = value
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// We might get values with space, add it to prev key
|
// We might get values with space, add it to prev key
|
||||||
value += " " + nBytes
|
value += " " + nBytes
|
||||||
fixPunctuantions(&value)
|
fixPunctuations(&value)
|
||||||
m[key] = value
|
m[key] = value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ func ParseAuditEvent(str string, msgType auditConstant, interpret bool) (*AuditE
|
||||||
value = value[newIndex+1:]
|
value = value[newIndex+1:]
|
||||||
}
|
}
|
||||||
|
|
||||||
fixPunctuantions(&value)
|
fixPunctuations(&value)
|
||||||
if key == "arch" {
|
if key == "arch" {
|
||||||
// determine machine type
|
// determine machine type
|
||||||
}
|
}
|
||||||
|
@ -221,7 +221,7 @@ func getSpaceSlice(str *string, b *string, v *int) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func fixPunctuantions(value *string) {
|
func fixPunctuations(value *string) {
|
||||||
// Remove trailing punctuation
|
// Remove trailing punctuation
|
||||||
l := len(*value)
|
l := len(*value)
|
||||||
if l > 0 && strings.HasSuffix(*value, "'") {
|
if l > 0 && strings.HasSuffix(*value, "'") {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче