Skip to content

Commit

Permalink
checked against lastest version of the linter
Browse files Browse the repository at this point in the history
Signed-off-by: Angelo De Caro <[email protected]>
  • Loading branch information
adecaro committed Dec 18, 2024
1 parent 8c98495 commit 2eb66c5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion integration/nwo/common/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (r *Runner) Run(sigChan <-chan os.Signal, ready chan<- struct{}) error {
startCheckTimeout = time.After(startCheckDuration)
}

detectStartCheck = allOutput.Detect(r.StartCheck)
detectStartCheck = allOutput.Detect("%s", r.StartCheck)

for {
select {
Expand Down
2 changes: 1 addition & 1 deletion platform/view/core/manager/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func runViewOn(v view.View, opts []view.RunViewOption, ctx localContext) (res in
case error:
err = errors.WithMessage(e, "caught panic")
case string:
err = errors.Errorf(e)
err = errors.New(e)
default:
err = errors.Errorf("caught panic [%v]", e)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (r *delimitedReader) Read(p []byte) (int, error) {
func readExpectedLength(p []byte) (int, error) {
length, n := binary.Uvarint(p)
if n <= 0 {
return 0, errors.Errorf("failed reading expected length [" + string(p) + "]")
return 0, errors.Errorf("failed reading expected length [%s]", string(p))
}
logger.Debugf("Reading only size: %d + %d", length, len(p))
return int(length) + len(p), nil
Expand Down
4 changes: 2 additions & 2 deletions platform/view/services/db/driver/sql/postgres/errormapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ func (m *errorMapper) WrapError(err error) error {

switch pgErr.Code {
case "23505":
return errors.Wrapf(driver.UniqueKeyViolation, err.Error())
return errors.Wrapf(driver.UniqueKeyViolation, "%s", err)
case "40P01":
return errors.Wrapf(driver.DeadlockDetected, err.Error())
return errors.Wrapf(driver.DeadlockDetected, "%s", err)
default:
logger.Warnf("Unmapped postgres error with code [%s]", pgErr)
return pgErr
Expand Down
2 changes: 1 addition & 1 deletion platform/view/services/db/driver/sql/sqlite/errormapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func (m *errorMapper) WrapError(err error) error {
if err, ok := err.(*sqlite.Error); ok {
switch err.Code() {
case 1555:
return errors.Wrapf(driver.UniqueKeyViolation, err.Error())
return errors.Wrapf(driver.UniqueKeyViolation, "%s", err)
default:
logger.Warnf("Unmapped sqlite error with code [%d]", err.Code())
}
Expand Down

0 comments on commit 2eb66c5

Please sign in to comment.