summaryrefslogtreecommitdiffstats
path: root/cmd/manager_logging.go
diff options
context:
space:
mode:
authorCheng <36215014+ChengenH@users.noreply.github.com>2024-04-21 21:44:03 +0200
committerEarl Warren <contact@earl-warren.org>2024-04-28 15:39:00 +0200
commit2ec0c5e28454413856a6de48d197fa29170dd79b (patch)
tree24dd6a1f72b9a250f25729ad7ed495ed02ea4af2 /cmd/manager_logging.go
parentMerge pull request 'Fix issue watch button' (#3509) from fnetx/fix-issue-watc... (diff)
downloadforgejo-2ec0c5e28454413856a6de48d197fa29170dd79b.tar.xz
forgejo-2ec0c5e28454413856a6de48d197fa29170dd79b.zip
chore: use errors.New to replace fmt.Errorf with no parameters will much better (#30621)
use errors.New to replace fmt.Errorf with no parameters will much better (cherry picked from commit 9de443ced2c328d9b58a5e144a765f402aab859d)
Diffstat (limited to 'cmd/manager_logging.go')
-rw-r--r--cmd/manager_logging.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/manager_logging.go b/cmd/manager_logging.go
index 2c701f2672..6049b00d5e 100644
--- a/cmd/manager_logging.go
+++ b/cmd/manager_logging.go
@@ -4,6 +4,7 @@
package cmd
import (
+ "errors"
"fmt"
"os"
@@ -249,7 +250,7 @@ func runAddFileLogger(c *cli.Context) error {
if c.IsSet("filename") {
vals["filename"] = c.String("filename")
} else {
- return fmt.Errorf("filename must be set when creating a file logger")
+ return errors.New("filename must be set when creating a file logger")
}
if c.IsSet("rotate") {
vals["rotate"] = c.Bool("rotate")