fmt fixes

This commit is contained in:
Leonid Bugaev
2016-05-13 14:46:27 +05:00
parent 19bfb8211c
commit 663bd8b95d
5 changed files with 12 additions and 12 deletions
+6 -6
View File
@@ -5,14 +5,14 @@ package main
import (
"flag"
"fmt"
"io"
"log"
"os"
"os/signal"
"syscall"
"io"
"runtime"
_ "runtime/debug"
"runtime/pprof"
"syscall"
"time"
)
@@ -56,16 +56,16 @@ func main() {
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
go func(){
<- c
go func() {
<-c
for _, p := range Plugins.All {
for _, p := range Plugins.All {
if cp, ok := p.(io.Closer); ok {
cp.Close()
}
}
os.Exit(1)
os.Exit(1)
}()
}
+1 -1
View File
@@ -10,9 +10,9 @@ import (
"runtime/debug"
"strconv"
"strings"
"sync"
"syscall"
"time"
"sync"
)
var httpMu sync.Mutex
+1 -1
View File
@@ -69,7 +69,7 @@ func (i *RAWInput) listen(address string) {
ch := i.listener.Receiver()
go func(){
go func() {
for {
select {
case <-i.quit:
+3 -3
View File
@@ -4,19 +4,19 @@ import (
"io"
"reflect"
"strings"
"time"
"sync"
"time"
)
// InOutPlugins struct for holding references to plugins
type InOutPlugins struct {
Inputs []io.Reader
Outputs []io.Writer
All []interface{}
All []interface{}
}
var pluginMu sync.Mutex
// Plugins holds all the plugin objects
var Plugins *InOutPlugins = new(InOutPlugins)
+1 -1
View File
@@ -61,7 +61,7 @@ type Listener struct {
messageExpire time.Duration
conn net.PacketConn
conn net.PacketConn
pcapHandles []*pcap.Handle
quit chan bool