summaryrefslogtreecommitdiffstats
path: root/pkg/app
diff options
context:
space:
mode:
authorjiepeng <jiepengthegreat@126.com>2022-09-13 18:11:03 +0800
committerJesse Duffield <jessedduffield@gmail.com>2022-09-17 15:10:41 -0700
commitb8900baf1ada72c24e58c487122c21e80858f52a (patch)
tree64c67fecd215d00e540a5d5c2030878b92cff981 /pkg/app
parentc81333fefe2f1e27ab2fcb6a0dc37d82ca47c711 (diff)
remove deprecated calls
Diffstat (limited to 'pkg/app')
-rw-r--r--pkg/app/daemon/daemon.go3
-rw-r--r--pkg/app/logging.go4
2 files changed, 3 insertions, 4 deletions
diff --git a/pkg/app/daemon/daemon.go b/pkg/app/daemon/daemon.go
index ea71bb956..182807b02 100644
--- a/pkg/app/daemon/daemon.go
+++ b/pkg/app/daemon/daemon.go
@@ -1,7 +1,6 @@
package daemon
import (
- "io/ioutil"
"log"
"os"
"path/filepath"
@@ -77,7 +76,7 @@ func (self *rebaseDaemon) Run() error {
self.c.Log.Info("args: ", os.Args)
if strings.HasSuffix(os.Args[1], "git-rebase-todo") {
- if err := ioutil.WriteFile(os.Args[1], []byte(os.Getenv(RebaseTODOEnvKey)), 0o644); err != nil {
+ if err := os.WriteFile(os.Args[1], []byte(os.Getenv(RebaseTODOEnvKey)), 0o644); err != nil {
return err
}
} else if strings.HasSuffix(os.Args[1], filepath.Join(gitDir(), "COMMIT_EDITMSG")) { // TODO: test
diff --git a/pkg/app/logging.go b/pkg/app/logging.go
index 7a5eef74e..65bed7823 100644
--- a/pkg/app/logging.go
+++ b/pkg/app/logging.go
@@ -1,7 +1,7 @@
package app
import (
- "io/ioutil"
+ "io"
"log"
"os"
@@ -26,7 +26,7 @@ func newLogger(config config.AppConfigurer) *logrus.Entry {
func newProductionLogger() *logrus.Logger {
log := logrus.New()
- log.Out = ioutil.Discard
+ log.Out = io.Discard
log.SetLevel(logrus.ErrorLevel)
return log
}