Add gofmt -s to the build

This commit is contained in:
Edznux 2018-10-23 03:27:38 +02:00
commit e333df35d4
4 changed files with 35152 additions and 35150 deletions

View file

@ -3,7 +3,7 @@ PACKAGES=core firewall log modules network packets session tls
all: deps build
deps: godep golint gomegacheck
deps: godep golint gofmt gomegacheck
@dep ensure
build: resources
@ -54,3 +54,6 @@ golint:
gomegacheck:
@go get honnef.co/go/tools/cmd/megacheck
gofmt:
gofmt -s -w $(PACKAGES)

View file

@ -28,7 +28,7 @@ func (s *EventsStream) shouldDumpHttpRequest(req HTTPRequest) bool {
return true
}
// search for interesting headers and cookies
for name, _ := range req.Headers {
for name := range req.Headers {
headerName := strings.ToLower(name)
if strings.Contains(headerName, "auth") || strings.Contains(headerName, "token") {
return true
@ -48,7 +48,7 @@ func (s *EventsStream) shouldDumpHttpResponse(res HTTPResponse) bool {
return true
}
// search for interesting headers
for name, _ := range res.Headers {
for name := range res.Headers {
headerName := strings.ToLower(name)
if strings.Contains(headerName, "auth") || strings.Contains(headerName, "token") || strings.Contains(headerName, "cookie") {
return true

View file

@ -2,11 +2,11 @@ package network
import (
"fmt"
"strings"
"math/big"
"strings"
)
var manuf = map[string]string {
var manuf = map[string]string{
"24.24664": "Copper Mountain Communications, Inc.",
"24.2789": "ScottCare Corporation",
"12.346853203968": "Energy ICT",
@ -35139,7 +35139,6 @@ var manuf = map[string]string {
"12.123917679357952": "Key Chemical & Equipment Company",
}
func ManufLookup(mac string) string {
macHex := strings.Replace(mac, ":", "", -1)
macInt := new(big.Int)

View file

@ -84,7 +84,7 @@ func NewMDNSProbe(from net.IP, from_hw net.HardwareAddr) (error, []byte) {
RD: true,
OpCode: layers.DNSOpCodeQuery,
Questions: []layers.DNSQuestion{
layers.DNSQuestion{
{
Name: []byte("_services._dns-sd._udp.local"),
Type: layers.DNSTypePTR,
Class: layers.DNSClassIN,