Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dogancanbakir committed Aug 14, 2024
1 parent 7265c5b commit 1e7f067
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion channelutil/clone_join_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func TestCloneCounter(t *testing.T) {
cloner := channelutil.NewCloneChannels[struct{}](cloneOpts)
err := cloner.Clone(context.TODO(), source, sinks...)
if err != nil {
t.Fatalf(err.Error())
t.Fatalf("%s", err.Error())
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions errkit/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func Wrap(err error, message string) error {
}
x := &ErrorX{}
parseError(x, err)
x.Msgf(message)
x.Msgf("%s", message)
return x
}

Expand Down Expand Up @@ -148,7 +148,7 @@ func WithMessage(err error, message string) error {
}
x := &ErrorX{}
parseError(x, err)
x.Msgf(message)
x.Msgf("%s", message)
return x
}

Expand Down
8 changes: 4 additions & 4 deletions errors/enriched.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ func (e *enrichedError) Wrap(err ...error) Error {
continue
}
if ee, ok := v.(*enrichedError); ok {
_ = e.Msgf(ee.errString).WithLevel(ee.Level).WithTag(ee.Tags...)
_ = e.Msgf("%s", ee.errString).WithLevel(ee.Level).WithTag(ee.Tags...)
e.StackTrace += ee.StackTrace
} else {
_ = e.Msgf(v.Error())
_ = e.Msgf("%s", v.Error())
}
}
return e
Expand Down Expand Up @@ -131,10 +131,10 @@ func NewWithErr(err error) Error {
return nil
}
if ee, ok := err.(*enrichedError); ok {
x := New(ee.errString).WithTag(ee.Tags...).WithLevel(ee.Level)
x := New("%s", ee.errString).WithTag(ee.Tags...).WithLevel(ee.Level)
x.(*enrichedError).StackTrace = ee.StackTrace
}
return New(err.Error())
return New("%s", err.Error())
}

// NewWithTag creates an error with tag
Expand Down
6 changes: 3 additions & 3 deletions exec/executil.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func RunSafe(cmd ...string) (string, error) {

if err := cmdExec.Wait(); err != nil {
if _, ok := err.(*exec.ExitError); ok {
adbError = errkit.Append(err, errkit.New(string(errorData)), errkit.New("exit error"))
adbError = errkit.Append(err, errkit.New("%s", string(errorData)), errkit.New("exit error"))
outData = errorData
} else {
return "", errkit.Wrap(err, "process i/o error")
Expand Down Expand Up @@ -215,7 +215,7 @@ func RunSh(cmd ...string) (string, error) {

if err := cmdExec.Wait(); err != nil {
if _, ok := err.(*exec.ExitError); ok {
adbError = errkit.Append(err, errkit.New(string(errorData)), errkit.New("exit error"))
adbError = errkit.Append(err, errkit.New("%s", string(errorData)), errkit.New("exit error"))
outData = errorData
} else {
return "", errkit.Wrap(err, "process i/o error")
Expand Down Expand Up @@ -272,7 +272,7 @@ func RunPS(cmd string) (string, error) {

if err := cmdExec.Wait(); err != nil {
if _, ok := err.(*exec.ExitError); ok {
adbError = errkit.Append(err, errkit.New(string(errorData)), errkit.New("exit error"))
adbError = errkit.Append(err, errkit.New("%s", string(errorData)), errkit.New("exit error"))
outData = errorData
} else {
return "", errkit.Wrap(err, "process i/o error")
Expand Down

0 comments on commit 1e7f067

Please sign in to comment.