diff --git a/tap/src/cleaner.go b/tap/src/cleaner.go index 9e3b4793b..5ee45a961 100644 --- a/tap/src/cleaner.go +++ b/tap/src/cleaner.go @@ -20,7 +20,7 @@ type Cleaner struct { cleanPeriod time.Duration connectionTimeout time.Duration stats CleanerStats - statsMutex sync.Mutex + statsMutex sync.Mutex } func (cl *Cleaner) clean() { diff --git a/tap/src/grpc_assembler.go b/tap/src/grpc_assembler.go index f853ce3d2..04d246b82 100644 --- a/tap/src/grpc_assembler.go +++ b/tap/src/grpc_assembler.go @@ -43,7 +43,7 @@ func (fbs *fragmentsByStream) appendFrame(streamID uint32, frame http2.Frame) { if existingFragment, ok := (*fbs)[streamID]; ok { existingDataLen := len(existingFragment.data) // Never save more than maxHTTP2DataLen bytes - numBytesToAppend := int(math.Min(float64(maxHTTP2DataLen- existingDataLen), float64(newDataLen))) + numBytesToAppend := int(math.Min(float64(maxHTTP2DataLen - existingDataLen), float64(newDataLen))) existingFragment.data = append(existingFragment.data, frame.Data()[:numBytesToAppend]...) } else { @@ -77,7 +77,7 @@ func createGrpcAssembler(b *bufio.Reader) GrpcAssembler { type GrpcAssembler struct { fragmentsByStream fragmentsByStream - framer *http2.Framer + framer *http2.Framer } func (ga *GrpcAssembler) readMessage() (uint32, interface{}, string, error) { @@ -112,15 +112,15 @@ func (ga *GrpcAssembler) readMessage() (uint32, interface{}, string, error) { var messageHTTP1 interface{} if _, ok := headersHTTP1[":method"]; ok { messageHTTP1 = http.Request{ - Header: headersHTTP1, - Proto: protoHTTP2, + Header: headersHTTP1, + Proto: protoHTTP2, ProtoMajor: protoMajorHTTP2, ProtoMinor: protoMinorHTTP2, } } else if _, ok := headersHTTP1[":status"]; ok { messageHTTP1 = http.Response{ - Header: headersHTTP1, - Proto: protoHTTP2, + Header: headersHTTP1, + Proto: protoHTTP2, ProtoMajor: protoMajorHTTP2, ProtoMinor: protoMinorHTTP2, } diff --git a/tap/src/passive_tapper.go b/tap/src/passive_tapper.go index c982970c8..e29903e92 100644 --- a/tap/src/passive_tapper.go +++ b/tap/src/passive_tapper.go @@ -91,7 +91,7 @@ var dumpToHar = flag.Bool("hardump", false, "Dump traffic to har files") var harOutputDir = flag.String("hardir", "output", "Directory in which to store output har files") var harEntriesPerFile = flag.Int("harentriesperfile", 200, "Number of max number of har entries to store in each file") -var reqResMatcher = createResponseRequestMatcher() // global +var reqResMatcher = createResponseRequestMatcher() // global var statsTracker = StatsTracker{} // global diff --git a/tap/src/stats_tracker.go b/tap/src/stats_tracker.go index 72a6f1bc5..b362b4bb4 100644 --- a/tap/src/stats_tracker.go +++ b/tap/src/stats_tracker.go @@ -9,8 +9,8 @@ type AppStats struct { } type StatsTracker struct { - stats AppStats - statsMutex sync.Mutex + stats AppStats + statsMutex sync.Mutex } func (st *StatsTracker) incMatchedMessages() {