From f7ba3d175e23adb28a71fe65a9e706989a8ec032 Mon Sep 17 00:00:00 2001 From: Derek Collison Date: Fri, 21 Apr 2017 09:21:33 -0700 Subject: [PATCH] Correct invocation of misspell with fixes --- .travis.yml | 2 +- server/log.go | 4 ++-- server/monitor.go | 10 +++++----- server/opts.go | 4 ++-- server/route.go | 4 ++-- server/server.go | 2 +- server/sublist.go | 4 ++-- server/sublist_test.go | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4b4de981..fadb17e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ before_script: - go fmt ./... - go vet $EXCLUDE_VENDOR - gosimple $EXCLUDE_VENDOR -- misspell -error -locale US $EXCLUDE_VENDOR +- misspell -error -locale US . - staticcheck $EXCLUDE_VENDOR script: - go test -i -race $EXCLUDE_VENDOR diff --git a/server/log.go b/server/log.go index 26176d3e..c05889f3 100644 --- a/server/log.go +++ b/server/log.go @@ -1,4 +1,4 @@ -// Copyright 2012-2016 Apcera Inc. All rights reserved. +// Copyright 2012-2017 Apcera Inc. All rights reserved. package server @@ -56,7 +56,7 @@ func (s *Server) SetLogger(logger Logger, debugFlag, traceFlag bool) { } // If the logger is a file based logger, close and re-open the file. -// This allows for file rotation by 'mv'ing the file then signalling +// This allows for file rotation by 'mv'ing the file then signaling // the process to trigger this function. func (s *Server) ReOpenLogFile() { // Check to make sure this is a file logger. diff --git a/server/monitor.go b/server/monitor.go index addcf07e..7f8a7488 100644 --- a/server/monitor.go +++ b/server/monitor.go @@ -1,4 +1,4 @@ -// Copyright 2013-2015 Apcera Inc. All rights reserved. +// Copyright 2013-2017 Apcera Inc. All rights reserved. package server @@ -240,7 +240,7 @@ func (s *Server) HandleConnz(w http.ResponseWriter, r *http.Request) { b, err := json.MarshalIndent(c, "", " ") if err != nil { - Errorf("Error marshalling response to /connz request: %v", err) + Errorf("Error marshaling response to /connz request: %v", err) } // Handle response @@ -331,7 +331,7 @@ func (s *Server) HandleRoutez(w http.ResponseWriter, r *http.Request) { b, err := json.MarshalIndent(rs, "", " ") if err != nil { - Errorf("Error marshalling response to /routez request: %v", err) + Errorf("Error marshaling response to /routez request: %v", err) } // Handle response @@ -347,7 +347,7 @@ func (s *Server) HandleSubsz(w http.ResponseWriter, r *http.Request) { st := &Subsz{s.sl.Stats()} b, err := json.MarshalIndent(st, "", " ") if err != nil { - Errorf("Error marshalling response to /subscriptionsz request: %v", err) + Errorf("Error marshaling response to /subscriptionsz request: %v", err) } // Handle response @@ -484,7 +484,7 @@ func (s *Server) HandleVarz(w http.ResponseWriter, r *http.Request) { b, err := json.MarshalIndent(v, "", " ") if err != nil { - Errorf("Error marshalling response to /varz request: %v", err) + Errorf("Error marshaling response to /varz request: %v", err) } // Handle response diff --git a/server/opts.go b/server/opts.go index 48ecd0d1..39d74fab 100644 --- a/server/opts.go +++ b/server/opts.go @@ -1,4 +1,4 @@ -// Copyright 2012-2016 Apcera Inc. All rights reserved. +// Copyright 2012-2017 Apcera Inc. All rights reserved. package server @@ -397,7 +397,7 @@ func parseUsers(mv interface{}) ([]*User, error) { user.Username = v.(string) case "pass", "password": user.Password = v.(string) - case "permission", "permissions", "authroization": + case "permission", "permissions", "authorization": pm, ok := v.(map[string]interface{}) if !ok { return nil, fmt.Errorf("Expected user permissions to be a map/struct, got %+v", v) diff --git a/server/route.go b/server/route.go index 7c2d7502..4cbb5e54 100644 --- a/server/route.go +++ b/server/route.go @@ -1,4 +1,4 @@ -// Copyright 2013-2016 Apcera Inc. All rights reserved. +// Copyright 2013-2017 Apcera Inc. All rights reserved. package server @@ -72,7 +72,7 @@ func (c *client) sendConnect(tlsRequired bool) { } b, err := json.Marshal(cinfo) if err != nil { - c.Errorf("Error marshalling CONNECT to route: %v\n", err) + c.Errorf("Error marshaling CONNECT to route: %v\n", err) c.closeConnection() return } diff --git a/server/server.go b/server/server.go index 6f5206fa..35fc1fdc 100644 --- a/server/server.go +++ b/server/server.go @@ -150,7 +150,7 @@ func (s *Server) generateServerInfoJSON() { // Generate the info json b, err := json.Marshal(s.info) if err != nil { - Fatalf("Error marshalling INFO JSON: %+v\n", err) + Fatalf("Error marshaling INFO JSON: %+v\n", err) return } s.infoJSON = []byte(fmt.Sprintf("INFO %s %s", b, CR_LF)) diff --git a/server/sublist.go b/server/sublist.go index 23b16cb0..de277fde 100644 --- a/server/sublist.go +++ b/server/sublist.go @@ -1,4 +1,4 @@ -// Copyright 2016 Apcera Inc. All rights reserved. +// Copyright 2016-2017 Apcera Inc. All rights reserved. // Package sublist is a routing mechanism to handle subject distribution // and provides a facility to match subjects from published messages to @@ -70,7 +70,7 @@ func newNode() *node { } // Create a new default level. We use FNV1A as the hash -// algortihm for the tokens, which should be short. +// algorithm for the tokens, which should be short. func newLevel() *level { return &level{nodes: make(map[string]*node)} } diff --git a/server/sublist_test.go b/server/sublist_test.go index ce7c0d7b..f9d25537 100644 --- a/server/sublist_test.go +++ b/server/sublist_test.go @@ -208,7 +208,7 @@ func TestSublistRemoveCleanupWildcards(t *testing.T) { func TestSublistInvalidSubjectsInsert(t *testing.T) { s := NewSublist() - // Insert, or subscribtions, can have wildcards, but not empty tokens, + // Insert, or subscriptions, can have wildcards, but not empty tokens, // and can not have a FWC that is not the terminal token. // beginning empty token