From 52136120333c5738feae5fc5f43c9577fdcbac3c Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Wed, 20 Jul 2022 14:53:11 +0800 Subject: [PATCH] chore: remove unused logrous package --- cmd/root.go | 14 -------------- go.mod | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 5d214c9..a15b5c5 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -10,7 +10,6 @@ import ( "github.com/nektos/act/pkg/model" "github.com/nektos/act/pkg/runner" "github.com/rs/zerolog/log" - "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) @@ -107,17 +106,6 @@ func getWorkflowsPath() (string, error) { return p, nil } -type StepHook struct{} - -func (hook *StepHook) Levels() []logrus.Level { - return logrus.AllLevels -} - -func (hook *StepHook) Fire(entry *logrus.Entry) error { - fmt.Printf("====== %#v \n ", entry) - return nil -} - func runTask(ctx context.Context, input *Input, jobID string) error { workflowsPath, err := getWorkflowsPath() if err != nil { @@ -192,8 +180,6 @@ func runTask(ctx context.Context, input *Input, jobID string) error { return fmt.Errorf("New config failed: %v", err) } - logrus.AddHook(&StepHook{}) - cancel := artifacts.Serve(ctx, input.artifactServerPath, input.artifactServerPort) executor := r.NewPlanExecutor(plan).Finally(func(ctx context.Context) error { diff --git a/go.mod b/go.mod index e39e0c2..61c56c3 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,6 @@ require ( github.com/gorilla/websocket v1.4.2 github.com/nektos/act v0.2.26 github.com/rs/zerolog v1.26.1 - github.com/sirupsen/logrus v1.8.1 github.com/spf13/cobra v1.4.0 ) @@ -57,6 +56,7 @@ require ( github.com/rivo/uniseg v0.2.0 // indirect github.com/robfig/cron v1.2.0 // indirect github.com/sergi/go-diff v1.2.0 // indirect + github.com/sirupsen/logrus v1.8.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/xanzy/ssh-agent v0.3.1 // indirect go.opencensus.io v0.23.0 // indirect