Skip to content

Commit

Permalink
Refactor to fix all but the Id -> ID lint errors
Browse files Browse the repository at this point in the history
In order to support more contributors, prepare the project for clean
lint passes.

The lint error for Id in names will produce breaking changes. If they
were fixed only non-breaking changes, it would create inconsistency.
They are an unfortunate relic from this library coming before that lint
rule. Consistency and interface comptability trumps the `Id` rule.
  • Loading branch information
Sean Treadway committed Dec 5, 2016
1 parent 091c350 commit 425d3a7
Show file tree
Hide file tree
Showing 14 changed files with 1,208 additions and 1,177 deletions.
8 changes: 5 additions & 3 deletions auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ type PlainAuth struct {
Password string
}

func (me *PlainAuth) Mechanism() string {
// Mechanism returns "PLAIN"
func (auth *PlainAuth) Mechanism() string {
return "PLAIN"
}

func (me *PlainAuth) Response() string {
return fmt.Sprintf("\000%s\000%s", me.Username, me.Password)
// Response returns the null character delimited encoding for the SASL PLAIN Mechanism.
func (auth *PlainAuth) Response() string {
return fmt.Sprintf("\000%s\000%s", auth.Username, auth.Password)
}

// Finds the first mechanism preferred by the client that the server supports.
Expand Down

0 comments on commit 425d3a7

Please sign in to comment.