Formatting fixes

This commit is contained in:
Leonid Bugaev
2015-09-01 22:43:36 +03:00
parent 60ddd535bc
commit cd83e6f9ba
5 changed files with 10 additions and 11 deletions
+1 -1
View File
@@ -2,9 +2,9 @@ package main
import (
"log"
"runtime"
"strconv"
"time"
"runtime"
)
const (
+3 -3
View File
@@ -45,9 +45,9 @@ func (i *HTTPInput) handler(w http.ResponseWriter, r *http.Request) {
http.Error(w, http.StatusText(200), 200)
select {
case i.data <- buf:
default:
Debug("[INPUT-HTTP] Dropping requests because output can't process them fast enough")
case i.data <- buf:
default:
Debug("[INPUT-HTTP] Dropping requests because output can't process them fast enough")
}
}
+3 -4
View File
@@ -1,14 +1,14 @@
package main
import (
"github.com/buger/gor/proto"
"io"
"log"
"net/http"
"os/exec"
"strings"
"sync"
"testing"
"os/exec"
"log"
"github.com/buger/gor/proto"
)
func TestHTTPInput(t *testing.T) {
@@ -37,7 +37,6 @@ func TestHTTPInput(t *testing.T) {
close(quit)
}
func TestInputHTTPLargePayload(t *testing.T) {
wg := new(sync.WaitGroup)
quit := make(chan int)
+1 -1
View File
@@ -133,7 +133,7 @@ func TestEchoMiddleware(t *testing.T) {
// Should receive 2 requests from original + 2 from replayed
client := NewHTTPClient(from.URL, &HTTPClientConfig{Debug: false})
for i:=0; i<10; i++ {
for i := 0; i < 10; i++ {
wg.Add(4)
// Request should be echoed
client.Get("/a")
+2 -2
View File
@@ -144,7 +144,7 @@ func (t *Listener) readRAWSocket() {
newBuf := make([]byte, n)
copy(newBuf, buf[:n])
go func(newBuf []byte){
go func(newBuf []byte) {
t.packetsChan <- ParseTCPPacket(addr, newBuf)
}(newBuf)
}
@@ -257,4 +257,4 @@ func (t *Listener) Close() {
close(t.quit)
t.conn.Close()
return
}
}