From d3e48b2676c70ef20c33d70220c4a4b22f3a0e5b Mon Sep 17 00:00:00 2001 From: Mikhail Osipov Date: Sun, 23 Feb 2020 16:07:22 +0300 Subject: make fmt --- pkg/server/cmds.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'pkg/server/cmds.go') diff --git a/pkg/server/cmds.go b/pkg/server/cmds.go index 6eabbde..3ce7150 100644 --- a/pkg/server/cmds.go +++ b/pkg/server/cmds.go @@ -1,14 +1,14 @@ package server import ( - "strings" - "sort" "log" + "sort" + "strings" ) type cmd struct { name string - f func (r *request) + f func(r *request) } type node struct { @@ -26,7 +26,7 @@ func newNode() *node { return &node{m: map[string]*node{}} } -func newCmd(f func (r *request), where string) { +func newCmd(f func(r *request), where string) { path := strings.Split(where, " ") node := cmds @@ -50,7 +50,7 @@ func newCmd(f func (r *request), where string) { node.c = &cmd{ name: where, - f: f, + f: f, } } @@ -64,7 +64,7 @@ func getCmd(path []string) (*cmd, []string) { } if node.c != nil { - return node.c, path[n + 1:] + return node.c, path[n+1:] } } @@ -74,9 +74,9 @@ func getCmd(path []string) (*cmd, []string) { func help(r *request) { var ss []string - var walker func ([]string, *node) + var walker func([]string, *node) - walker = func (path []string, node *node) { + walker = func(path []string, node *node) { if node.c != nil { ss = append(ss, strings.Join(path, " ")) return -- cgit v1.2.3-70-g09d2