diff --git a/README.md b/README.md index 0a7326b..44a3ccb 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ package main import ( "os" - "github.com/op/go-logging" + logging "github.com/op/go-logging" ) var log = logging.MustGetLogger("example") @@ -40,6 +40,7 @@ var format = logging.MustStringFormatter( // time this is logged, the Redacted() function will be called. type Password string +// Redacted returns a redacted string, used here to mask passwords as an example. func (p Password) Redacted() interface{} { return logging.Redact(string(p)) } diff --git a/examples/example.go b/examples/example.go index 9f4ddee..e77cbd1 100644 --- a/examples/example.go +++ b/examples/example.go @@ -3,7 +3,7 @@ package main import ( "os" - "github.com/op/go-logging" + logging "github.com/op/go-logging" ) var log = logging.MustGetLogger("example") @@ -19,6 +19,7 @@ var format = logging.MustStringFormatter( // time this is logged, the Redacted() function will be called. type Password string +// Redacted returns a redacted string, used here to mask passwords as an example. func (p Password) Redacted() interface{} { return logging.Redact(string(p)) }