Refactor protocol scanner

This commit is contained in:
Leonid Bugaev
2015-08-18 15:52:23 +03:00
parent a971d8a843
commit 7790b33cea
3 changed files with 20 additions and 21 deletions
+1 -3
View File
@@ -31,15 +31,13 @@ func (o *FileOutput) init(path string) {
}
}
var fileSeparator = "\n🐵🙈🙉\n"
func (o *FileOutput) Write(data []byte) (n int, err error) {
if !isOriginPayload(data) {
return len(data), nil
}
o.file.Write(data)
o.file.Write([]byte(fileSeparator))
o.file.Write([]byte(payloadSeparator))
return len(data), nil
}