Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

Commit

Permalink
Fix govet:fieldalignment linting errors
Browse files Browse the repository at this point in the history
Change field order of `Config` struct to reduce allocation
requirements and pass `fieldalignment` linting check.

refs GH-127
  • Loading branch information
atc0005 committed Apr 8, 2021
1 parent f36b3a4 commit b413d53
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cmd/bounce/decode-json-body.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
)

type malformedRequest struct {
status int
msg string
status int
}

// malformedRequest wraps errors from decoding JSON request bodies
Expand Down
15 changes: 8 additions & 7 deletions cmd/bounce/notify.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ import (
// error or success conditions
type NotifyResult struct {

// Val is the non-error condition message to return from a notification
// operation
Val string

// Err is the error condition message to return from a notification
// operation
Err error

// Val is the non-error condition message to return from a notification
// operation
Val string

// Success indicates whether the notification attempt succeeded or if it
// failed for one reason or another (remote API, timeout, cancellation,
// etc)
Expand All @@ -32,13 +32,14 @@ type NotifyResult struct {
// NotifyQueue represents a channel used to queue input data and responses
// between the main application, the notifications manager and "notifiers".
type NotifyQueue struct {
// The name of a queue. This is intended for display in log messages or
// other output to identify queues with pending items.
Name string

// Channel is a channel used to transport input data and responses.
Channel interface{}

// The name of a queue. This is intended for display in log messages or
// other output to identify queues with pending items.
Name string

// Count is the number of items currently in the queue
Count int

Expand Down
2 changes: 1 addition & 1 deletion routes/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import (
// API.
type Route struct {
Name string
AllowedMethods []string
Pattern string
Description string
HandlerFunc http.HandlerFunc
AllowedMethods []string
}

// Routes is a collection of defined routes, intended for bulk registration
Expand Down

0 comments on commit b413d53

Please sign in to comment.