Browse Source

Fix some linter warnings.

pull/4/head
Tommy van Leeuwen 5 years ago
parent
commit
4e2687264a
2 changed files with 2 additions and 1 deletions
  1. +1
    -0
      examples/logger/main.go
  2. +1
    -1
      publish.go

+ 1
- 0
examples/logger/main.go View File

@ -9,6 +9,7 @@ import (
// CustomLog is used in WithPublisherOptionsLogger to create a custom logger. // CustomLog is used in WithPublisherOptionsLogger to create a custom logger.
type CustomLog struct{} type CustomLog struct{}
// Printf is the only method needed in the Logger interface to function properly.
func (c *CustomLog) Printf(fmt string, args ...interface{}) { func (c *CustomLog) Printf(fmt string, args ...interface{}) {
log.Printf("mylogger: "+fmt, args...) log.Printf("mylogger: "+fmt, args...)
} }


+ 1
- 1
publish.go View File

@ -101,7 +101,7 @@ func WithPublisherOptionsLogging(options *PublisherOptions) {
options.Logger = &stdlog{} options.Logger = &stdlog{}
} }
// WithPublisherOptionLogger sets logging to a custom interface.
// WithPublisherOptionsLogger sets logging to a custom interface.
// Use WithPublisherOptionsLogging to just log to stdout. // Use WithPublisherOptionsLogging to just log to stdout.
func WithPublisherOptionsLogger(log Logger) func(options *PublisherOptions) { func WithPublisherOptionsLogger(log Logger) func(options *PublisherOptions) {
return func(options *PublisherOptions) { return func(options *PublisherOptions) {


Loading…
Cancel
Save