Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix function comments based on best practices from Effective Go #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion context.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type Context struct {
writeMutex sync.Mutex
}

// NewLoggers returns a new Context with no writers set.
// NewContext returns a new Context with no writers set.
// If the root level is UNSPECIFIED, WARNING is used.
func NewContext(rootLevel Level) *Context {
if rootLevel < TRACE || rootLevel > CRITICAL {
Expand Down
2 changes: 1 addition & 1 deletion loggocolor/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type colorWriter struct {
writer *ansiterm.Writer
}

// NewColorWriter will write out colored severity levels if the writer is
// NewWriter will write out colored severity levels if the writer is
// outputting to a terminal.
func NewWriter(writer io.Writer) loggo.Writer {
return &colorWriter{ansiterm.NewWriter(writer)}
Expand Down
2 changes: 1 addition & 1 deletion writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type Writer interface {
Write(entry Entry)
}

// NewMinLevelWriter returns a Writer that will only pass on the Write calls
// NewMinimumLevelWriter returns a Writer that will only pass on the Write calls
// to the provided writer if the log level is at or above the specified
// minimum level.
func NewMinimumLevelWriter(writer Writer, minLevel Level) Writer {
Expand Down