From 827bd953e7d9a0dbe7caab149b898a926546a044 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Wed, 20 Jul 2022 14:42:22 +0800 Subject: [PATCH] chore: fix lint error --- README.md | 2 +- cmd/damon.go | 6 ++++-- cmd/root.go | 58 ++++++++++++++++++++++++++-------------------------- 3 files changed, 34 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index da43c40..581ea33 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # act runner -Act runner is a runner for Forges supports Github Actions protocol. \ No newline at end of file +Act runner is a runner for Forges supports Github Actions protocol. diff --git a/cmd/damon.go b/cmd/damon.go index dbeaed9..331299b 100644 --- a/cmd/damon.go +++ b/cmd/damon.go @@ -188,8 +188,10 @@ func runDaemon(ctx context.Context, input *Input) func(cmd *cobra.Command, args default: } - conn.SetReadDeadline(time.Now().Add(timeout)) - conn.SetPongHandler(func(string) error { conn.SetReadDeadline(time.Now().Add(timeout)); return nil }) + _ = conn.SetReadDeadline(time.Now().Add(timeout)) + conn.SetPongHandler(func(string) error { + return conn.SetReadDeadline(time.Now().Add(timeout)) + }) _, message, err := conn.ReadMessage() if err != nil { diff --git a/cmd/root.go b/cmd/root.go index 49acbd7..5d214c9 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -17,39 +17,39 @@ import ( const version = "0.1" type Input struct { - actor string - workdir string - workflowsPath string - autodetectEvent bool - eventPath string - reuseContainers bool - bindWorkdir bool - secrets []string - envs []string - platforms []string - dryrun bool - forcePull bool - forceRebuild bool - noOutput bool - envfile string - secretfile string - insecureSecrets bool - defaultBranch string + actor string + // workdir string + // workflowsPath string + // autodetectEvent bool + // eventPath string + reuseContainers bool + bindWorkdir bool + // secrets []string + // envs []string + // platforms []string + // dryrun bool + forcePull bool + forceRebuild bool + // noOutput bool + // envfile string + // secretfile string + insecureSecrets bool + // defaultBranch string privileged bool usernsMode string containerArchitecture string containerDaemonSocket string - noWorkflowRecurse bool - useGitIgnore bool - forgeInstance string - containerCapAdd []string - containerCapDrop []string - autoRemove bool - artifactServerPath string - artifactServerPort string - jsonLogger bool - noSkipCheckout bool - remoteName string + // noWorkflowRecurse bool + useGitIgnore bool + forgeInstance string + containerCapAdd []string + containerCapDrop []string + autoRemove bool + artifactServerPath string + artifactServerPort string + jsonLogger bool + noSkipCheckout bool + // remoteName string } func (i *Input) newPlatforms() map[string]string {