mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Correct invocation of misspell with fixes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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)}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user