Skip to content

Commit

Permalink
Ensure error don't end in punctuation: ST1005
Browse files Browse the repository at this point in the history
  • Loading branch information
e-dard committed Nov 30, 2018
1 parent 9403c1e commit b81b30e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bolt/keyvalue_log.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func (c *Client) forEachLogEntry(ctx context.Context, tx *bolt.Tx, k []byte, opt

k, v := cur.Seek(startKey)
if !bytes.Equal(k, startKey) {
return fmt.Errorf("the first key not the key found in the log bounds. This should be impossible. Please report this error.")
return fmt.Errorf("the first key not the key found in the log bounds. This should be impossible. Please report this error")
}

count := 0
Expand Down
2 changes: 1 addition & 1 deletion bolt/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func encodeSecretKey(orgID platform.ID, k string) ([]byte, error) {
func decodeSecretKey(key []byte) (platform.ID, string, error) {
if len(key) < platform.IDLength {
// This should not happen.
return platform.InvalidID(), "", errors.New("provided key is too short to contain an ID. Please report this error.")
return platform.InvalidID(), "", errors.New("provided key is too short to contain an ID. Please report this error")
}

var id platform.ID
Expand Down
2 changes: 1 addition & 1 deletion chronograf/server/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ func setSuperAdmin(ctx context.Context, req userRequest, user *chronograf.User)
} else if !isSuperAdmin && (user.SuperAdmin != req.SuperAdmin) {
// If req.SuperAdmin has been set, and the request was not made with the SuperAdmin
// context, return error
return fmt.Errorf("user does not have authorization required to set SuperAdmin status. See https://github.com/influxdata/platform/chronograf/issues/2601 for more information.")
return fmt.Errorf("user does not have authorization required to set SuperAdmin status. See https://github.com/influxdata/platform/chronograf/issues/2601 for more information")
}

return nil
Expand Down
4 changes: 2 additions & 2 deletions chronograf/server/users_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ func TestService_NewUser(t *testing.T) {
},
wantStatus: http.StatusUnauthorized,
wantContentType: "application/json",
wantBody: `{"code":401,"message":"user does not have authorization required to set SuperAdmin status. See https://github.com/influxdata/platform/chronograf/issues/2601 for more information."}`,
wantBody: `{"code":401,"message":"user does not have authorization required to set SuperAdmin status. See https://github.com/influxdata/platform/chronograf/issues/2601 for more information"}`,
},
{
name: "Create a new SuperAdmin User - as superadmin",
Expand Down Expand Up @@ -1264,7 +1264,7 @@ func TestService_UpdateUser(t *testing.T) {
id: "1336",
wantStatus: http.StatusUnauthorized,
wantContentType: "application/json",
wantBody: `{"code":401,"message":"user does not have authorization required to set SuperAdmin status. See https://github.com/influxdata/platform/chronograf/issues/2601 for more information."}`,
wantBody: `{"code":401,"message":"user does not have authorization required to set SuperAdmin status. See https://github.com/influxdata/platform/chronograf/issues/2601 for more information"}`,
},
{
name: "Update a Chronograf user to super admin - with super admin context",
Expand Down
2 changes: 1 addition & 1 deletion nats/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

const ServerName = "platform"

var ErrNoNatsConnection = errors.New("nats connection has not been established. Call Open() first.")
var ErrNoNatsConnection = errors.New("nats connection has not been established. Call Open() first")

// Server wraps a connection to a NATS streaming server
type Server struct {
Expand Down

0 comments on commit b81b30e

Please sign in to comment.