Skip to content

Commit

Permalink
sql/pgwire: fix references to fmt.Stringer
Browse files Browse the repository at this point in the history
These methods were implementing the `fmt.Stringer` interface, not the
`fmt.Formatter` interface.
  • Loading branch information
nvanbenschoten committed Jan 5, 2021
1 parent db784a6 commit cde777d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/sql/pgwire/hba/hba.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const (
ConnAny = ConnHostAny | ConnLocal
)

// String implements the fmt.Formatter interface.
// String implements the fmt.Stringer interface.
func (t ConnType) String() string {
switch t {
case ConnLocal:
Expand All @@ -95,7 +95,7 @@ func (t ConnType) String() string {
}
}

// String implements the fmt.Formatter interface.
// String implements the fmt.Stringer interface.
func (c Conf) String() string {
if len(c.Entries) == 0 {
return "# (empty configuration)\n"
Expand Down Expand Up @@ -138,7 +138,7 @@ func (c Conf) String() string {
// the "Address" field.
type AnyAddr struct{}

// String implements the fmt.Formatter interface.
// String implements the fmt.Stringer interface.
func (AnyAddr) String() string { return "all" }

// GetOption returns the value of option name if there is exactly one
Expand Down Expand Up @@ -290,7 +290,7 @@ func (h Entry) OptionsString() string {
return sb.String()
}

// String implements the fmt.Formatter interface.
// String implements the fmt.Stringer interface.
func (h Entry) String() string {
return Conf{Entries: []Entry{h}}.String()
}
Expand All @@ -301,7 +301,7 @@ type String struct {
Quoted bool
}

// String implements the fmt.Formatter interface.
// String implements the fmt.Stringer interface.
func (s String) String() string {
if s.Quoted {
return `"` + s.Value + `"`
Expand Down

0 comments on commit cde777d

Please sign in to comment.