Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ package main
import (
"os"

"github.com/op/go-logging"
logging "github.com/op/go-logging"
)

var log = logging.MustGetLogger("example")
Expand All @@ -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))
}
Expand Down
3 changes: 2 additions & 1 deletion examples/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"os"

"github.com/op/go-logging"
logging "github.com/op/go-logging"
)

var log = logging.MustGetLogger("example")
Expand All @@ -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))
}
Expand Down