Skip to content

Commit

Permalink
task: don't mix pointer and non pointer receivers (#2799)
Browse files Browse the repository at this point in the history
  • Loading branch information
gssbzn authored Mar 25, 2024
1 parent 7a61306 commit 7cbb7e6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/log/log.go
Original file line number Diff line number Diff line change
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

0 comments on commit 7cbb7e6

Please sign in to comment.