Skip to content

Commit

Permalink
nit: make option interface internals private
Browse files Browse the repository at this point in the history
External packages don't need to implement this.
  • Loading branch information
Stebalien committed May 25, 2020
1 parent 357fbe4 commit 81b32c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pipe.go
Expand Up @@ -37,7 +37,7 @@ func NewPipeReader(opts ...PipeReaderOption) *PipeReader {
loggerMutex.Unlock()

for _, o := range opts {
o.SetOption(&opt)
o.setOption(&opt)
}

r, w := io.Pipe()
Expand All @@ -58,12 +58,12 @@ type pipeReaderOptions struct {
}

type PipeReaderOption interface {
SetOption(*pipeReaderOptions)
setOption(*pipeReaderOptions)
}

type pipeReaderOptionFunc func(*pipeReaderOptions)

func (p pipeReaderOptionFunc) SetOption(o *pipeReaderOptions) {
func (p pipeReaderOptionFunc) setOption(o *pipeReaderOptions) {
p(o)
}

Expand Down

0 comments on commit 81b32c2

Please sign in to comment.