mirror of
https://github.com/buger/goreplay.git
synced 2024-04-21 12:32:02 +00:00
Allow multiple url regexp and apply fmt
This commit is contained in:
+2
-2
@@ -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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user