Allow multiple url regexp and apply fmt

This commit is contained in:
Leonid Bugaev
2015-07-09 16:05:00 +05:00
parent 1ce10249be
commit 29035d4518
10 changed files with 224 additions and 171 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
package main
import (
"encoding/hex"
"fmt"
"io"
"log"
"net"
"time"
"encoding/hex"
)
type TCPOutput struct {
@@ -53,7 +53,7 @@ func (o *TCPOutput) worker() {
func (o *TCPOutput) Write(data []byte) (n int, err error) {
// Hex encoding always 2x number of bytes
encoded := make([]byte, len(data)*2 + 1)
encoded := make([]byte, len(data)*2+1)
hex.Encode(encoded, data)
o.buf <- append(encoded, '\n')