all: run gofumpt (#652)
* all: run gofumpt https://github.com/mvdan/gofumpt The main appeal for me here is that my (and many other peoples') editors run this on save, so doing a single diff here keeps other diffs minimal. * .github/workflows: add gofumpt checker
This commit is contained in:
parent
6b9dbc3b05
commit
89ab72bee0
33 changed files with 63 additions and 145 deletions
|
|
@ -4,7 +4,6 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"go4.org/netipx"
|
||||
"net"
|
||||
"net/netip"
|
||||
"os"
|
||||
|
|
@ -13,6 +12,8 @@ import (
|
|||
"syscall"
|
||||
"time"
|
||||
|
||||
"go4.org/netipx"
|
||||
|
||||
gocache "github.com/patrickmn/go-cache"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/tg123/sshpiper/libplugin"
|
||||
|
|
@ -20,7 +21,6 @@ import (
|
|||
)
|
||||
|
||||
func main() {
|
||||
|
||||
libplugin.CreateAndRunPluginTemplate(&libplugin.PluginTemplate{
|
||||
Name: "failtoban",
|
||||
Usage: "failtoban plugin, block ip after too many auth failures",
|
||||
|
|
@ -51,7 +51,6 @@ func main() {
|
|||
},
|
||||
},
|
||||
CreateConfig: func(c *cli.Context) (*libplugin.SshPiperPluginConfig, error) {
|
||||
|
||||
maxFailures := c.Int("max-failures")
|
||||
banDuration := c.Duration("ban-duration")
|
||||
logOnly := c.Bool("log-only")
|
||||
|
|
@ -133,7 +132,6 @@ func main() {
|
|||
}
|
||||
|
||||
func buildIPSet(cidrs []string) *netipx.IPSet {
|
||||
|
||||
var ipsetBuilder netipx.IPSetBuilder
|
||||
|
||||
for _, cidr := range cidrs {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue