From 3b0a58d24c3d5ca7b5b7acbe0e10de16eeccd4bd Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Tue, 12 Sep 2017 09:28:11 -0400 Subject: [PATCH] go fmt --- .../backends/srndv2/src/nntpchan/cmd/nntpchan/main.go | 6 +++--- .../srndv2/src/nntpchan/cmd/nntpserver/main.go | 2 +- contrib/backends/srndv2/src/nntpchan/lib/api/api.go | 1 + .../srndv2/src/nntpchan/lib/database/database.go | 2 +- .../backends/srndv2/src/nntpchan/lib/network/dial.go | 2 +- .../backends/srndv2/src/nntpchan/lib/nntp/common.go | 2 +- .../backends/srndv2/src/nntpchan/lib/nntp/conn_v1.go | 10 +++++----- .../backends/srndv2/src/nntpchan/lib/nntp/filter.go | 2 +- .../backends/srndv2/src/nntpchan/lib/nntp/server.go | 2 +- contrib/backends/srndv2/src/nntpchan/lib/store/fs.go | 2 +- contrib/backends/srndv2/src/nntpchan/lib/store/null.go | 2 +- contrib/backends/srndv2/src/nntpchan/lib/util/ip.go | 2 +- .../backends/srndv2/src/nntpchan/lib/webhooks/http.go | 8 ++++---- 13 files changed, 22 insertions(+), 21 deletions(-) diff --git a/contrib/backends/srndv2/src/nntpchan/cmd/nntpchan/main.go b/contrib/backends/srndv2/src/nntpchan/cmd/nntpchan/main.go index 4c09f4b..d3d5868 100644 --- a/contrib/backends/srndv2/src/nntpchan/cmd/nntpchan/main.go +++ b/contrib/backends/srndv2/src/nntpchan/cmd/nntpchan/main.go @@ -2,13 +2,13 @@ package main import ( log "github.com/Sirupsen/logrus" + "net" + "net/http" + _ "net/http/pprof" "nntpchan/lib/config" "nntpchan/lib/nntp" "nntpchan/lib/store" "nntpchan/lib/webhooks" - "net" - "net/http" - _ "net/http/pprof" "os" "os/signal" "syscall" diff --git a/contrib/backends/srndv2/src/nntpchan/cmd/nntpserver/main.go b/contrib/backends/srndv2/src/nntpchan/cmd/nntpserver/main.go index 9fa80e5..ac17e2c 100644 --- a/contrib/backends/srndv2/src/nntpchan/cmd/nntpserver/main.go +++ b/contrib/backends/srndv2/src/nntpchan/cmd/nntpserver/main.go @@ -4,10 +4,10 @@ package main import ( log "github.com/Sirupsen/logrus" + "net" "nntpchan/lib/config" "nntpchan/lib/nntp" "nntpchan/lib/store" - "net" ) func main() { diff --git a/contrib/backends/srndv2/src/nntpchan/lib/api/api.go b/contrib/backends/srndv2/src/nntpchan/lib/api/api.go index c904083..caf1e6a 100644 --- a/contrib/backends/srndv2/src/nntpchan/lib/api/api.go +++ b/contrib/backends/srndv2/src/nntpchan/lib/api/api.go @@ -3,6 +3,7 @@ package api import ( "nntpchan/lib/model" ) + // json api type API interface { MakePost(p model.Post) diff --git a/contrib/backends/srndv2/src/nntpchan/lib/database/database.go b/contrib/backends/srndv2/src/nntpchan/lib/database/database.go index 793176b..bebfc66 100644 --- a/contrib/backends/srndv2/src/nntpchan/lib/database/database.go +++ b/contrib/backends/srndv2/src/nntpchan/lib/database/database.go @@ -2,9 +2,9 @@ package database import ( "errors" + "net" "nntpchan/lib/config" "nntpchan/lib/model" - "net" "strings" ) diff --git a/contrib/backends/srndv2/src/nntpchan/lib/network/dial.go b/contrib/backends/srndv2/src/nntpchan/lib/network/dial.go index 07b3861..f280a40 100644 --- a/contrib/backends/srndv2/src/nntpchan/lib/network/dial.go +++ b/contrib/backends/srndv2/src/nntpchan/lib/network/dial.go @@ -2,8 +2,8 @@ package network import ( "errors" - "nntpchan/lib/config" "net" + "nntpchan/lib/config" "strings" ) diff --git a/contrib/backends/srndv2/src/nntpchan/lib/nntp/common.go b/contrib/backends/srndv2/src/nntpchan/lib/nntp/common.go index adb42d7..9076e0e 100644 --- a/contrib/backends/srndv2/src/nntpchan/lib/nntp/common.go +++ b/contrib/backends/srndv2/src/nntpchan/lib/nntp/common.go @@ -1,10 +1,10 @@ package nntp import ( - "nntpchan/lib/crypto" "crypto/sha1" "fmt" "io" + "nntpchan/lib/crypto" "regexp" "strings" "time" diff --git a/contrib/backends/srndv2/src/nntpchan/lib/nntp/conn_v1.go b/contrib/backends/srndv2/src/nntpchan/lib/nntp/conn_v1.go index c6ec316..2681c9a 100644 --- a/contrib/backends/srndv2/src/nntpchan/lib/nntp/conn_v1.go +++ b/contrib/backends/srndv2/src/nntpchan/lib/nntp/conn_v1.go @@ -9,16 +9,16 @@ import ( "errors" "fmt" log "github.com/Sirupsen/logrus" - "nntpchan/lib/config" - "nntpchan/lib/database" - "nntpchan/lib/nntp/message" - "nntpchan/lib/store" - "nntpchan/lib/util" "io" "mime" "mime/multipart" "net" "net/textproto" + "nntpchan/lib/config" + "nntpchan/lib/database" + "nntpchan/lib/nntp/message" + "nntpchan/lib/store" + "nntpchan/lib/util" "os" "strings" ) diff --git a/contrib/backends/srndv2/src/nntpchan/lib/nntp/filter.go b/contrib/backends/srndv2/src/nntpchan/lib/nntp/filter.go index 0c2ba75..f24db95 100644 --- a/contrib/backends/srndv2/src/nntpchan/lib/nntp/filter.go +++ b/contrib/backends/srndv2/src/nntpchan/lib/nntp/filter.go @@ -1,8 +1,8 @@ package nntp import ( - "nntpchan/lib/nntp/message" "io" + "nntpchan/lib/nntp/message" ) // defines interface for filtering an nntp article diff --git a/contrib/backends/srndv2/src/nntpchan/lib/nntp/server.go b/contrib/backends/srndv2/src/nntpchan/lib/nntp/server.go index e592507..790758d 100644 --- a/contrib/backends/srndv2/src/nntpchan/lib/nntp/server.go +++ b/contrib/backends/srndv2/src/nntpchan/lib/nntp/server.go @@ -2,11 +2,11 @@ package nntp import ( log "github.com/Sirupsen/logrus" + "net" "nntpchan/lib/config" "nntpchan/lib/database" "nntpchan/lib/network" "nntpchan/lib/store" - "net" "time" ) diff --git a/contrib/backends/srndv2/src/nntpchan/lib/store/fs.go b/contrib/backends/srndv2/src/nntpchan/lib/store/fs.go index b9d7d2f..35c0d6b 100644 --- a/contrib/backends/srndv2/src/nntpchan/lib/store/fs.go +++ b/contrib/backends/srndv2/src/nntpchan/lib/store/fs.go @@ -4,9 +4,9 @@ import ( "encoding/base32" "fmt" log "github.com/Sirupsen/logrus" - "nntpchan/lib/crypto" "io" "io/ioutil" + "nntpchan/lib/crypto" "os" "path/filepath" "time" diff --git a/contrib/backends/srndv2/src/nntpchan/lib/store/null.go b/contrib/backends/srndv2/src/nntpchan/lib/store/null.go index fee6fb4..de4e33b 100644 --- a/contrib/backends/srndv2/src/nntpchan/lib/store/null.go +++ b/contrib/backends/srndv2/src/nntpchan/lib/store/null.go @@ -1,8 +1,8 @@ package store import ( - "nntpchan/lib/util" "io" + "nntpchan/lib/util" "os" ) diff --git a/contrib/backends/srndv2/src/nntpchan/lib/util/ip.go b/contrib/backends/srndv2/src/nntpchan/lib/util/ip.go index e287094..da7333d 100644 --- a/contrib/backends/srndv2/src/nntpchan/lib/util/ip.go +++ b/contrib/backends/srndv2/src/nntpchan/lib/util/ip.go @@ -3,9 +3,9 @@ package util import ( "encoding/base64" "fmt" - "nntpchan/lib/crypto/nacl" "log" "net" + "nntpchan/lib/crypto/nacl" ) // given an address diff --git a/contrib/backends/srndv2/src/nntpchan/lib/webhooks/http.go b/contrib/backends/srndv2/src/nntpchan/lib/webhooks/http.go index df10db9..de76285 100644 --- a/contrib/backends/srndv2/src/nntpchan/lib/webhooks/http.go +++ b/contrib/backends/srndv2/src/nntpchan/lib/webhooks/http.go @@ -4,16 +4,16 @@ import ( "encoding/json" "fmt" log "github.com/Sirupsen/logrus" - "nntpchan/lib/config" - "nntpchan/lib/nntp" - "nntpchan/lib/nntp/message" - "nntpchan/lib/store" "io" "mime" "mime/multipart" "net/http" "net/textproto" "net/url" + "nntpchan/lib/config" + "nntpchan/lib/nntp" + "nntpchan/lib/nntp/message" + "nntpchan/lib/store" "regexp" "strings" )