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

task: don't mix pointer and non pointer receivers #2799

Merged
merged 1 commit into from Mar 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions internal/log/log.go
Expand Up @@ -64,42 +64,42 @@ func (l *Logger) IsWarningLevel() bool {
return l.level >= WarningLevel
}

func (l Logger) Debug(a ...any) (int, error) {
func (l *Logger) Debug(a ...any) (int, error) {
if !l.IsDebugLevel() {
return 0, nil
}
return fmt.Fprint(l.w, a...)
}

func (l Logger) Debugln(a ...any) (int, error) {
func (l *Logger) Debugln(a ...any) (int, error) {
if !l.IsDebugLevel() {
return 0, nil
}
return fmt.Fprintln(l.w, a...)
}

func (l Logger) Debugf(format string, a ...any) (int, error) {
func (l *Logger) Debugf(format string, a ...any) (int, error) {
if !l.IsDebugLevel() {
return 0, nil
}
return fmt.Fprintf(l.w, format, a...)
}

func (l Logger) Warning(a ...any) (int, error) {
func (l *Logger) Warning(a ...any) (int, error) {
if !l.IsWarningLevel() {
return 0, nil
}
return fmt.Fprint(l.w, a...)
}

func (l Logger) Warningln(a ...any) (int, error) {
func (l *Logger) Warningln(a ...any) (int, error) {
if !l.IsWarningLevel() {
return 0, nil
}
return fmt.Fprintln(l.w, a...)
}

func (l Logger) Warningf(format string, a ...any) (int, error) {
func (l *Logger) Warningf(format string, a ...any) (int, error) {
if !l.IsWarningLevel() {
return 0, nil
}
Expand Down