mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-21 16:01:22 +02:00
refactor: fix lint errors; improve error handling
This commit is contained in:
@@ -2,6 +2,7 @@ package route
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
entrypoint "github.com/yusing/godoxy/internal/entrypoint/types"
|
||||
@@ -17,7 +18,7 @@ func checkExists(ctx context.Context, r types.Route) error {
|
||||
}
|
||||
ep := entrypoint.FromCtx(ctx)
|
||||
if ep == nil {
|
||||
return fmt.Errorf("entrypoint not found in context")
|
||||
return errors.New("entrypoint not found in context")
|
||||
}
|
||||
var (
|
||||
existing types.Route
|
||||
|
||||
Reference in New Issue
Block a user