From 841a96560ab2c758dc941d4c4dabf699972541a3 Mon Sep 17 00:00:00 2001 From: Travis Carr Date: Sat, 31 Dec 2016 11:35:39 -0800 Subject: [PATCH] Cleaning up come complaints from the linter, and added a named import for logger since gofmt doesn't recognize it and autoamtically removes it. --- README.md | 3 ++- examples/example.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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)) }