From 99ab4f547bfb25e9862ccd3689422ce744375ee6 Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Tue, 15 Jun 2021 20:58:00 +0900 Subject: [PATCH 1/2] fix lint warnings - printf-style function with dynamic format string and no further arguments should use print-style function instead (SA1006) go-staticcheck - should use make([]string, 0) instead (S1019) go-staticcheck --- cli.go | 2 +- local.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli.go b/cli.go index c16a0a1..b818a19 100644 --- a/cli.go +++ b/cli.go @@ -155,7 +155,7 @@ func (cli *CLI) Run(args []string) int { // Show version and check latest version release if version { - fmt.Fprintf(cli.outStream, OutputVersion()) + fmt.Fprint(cli.outStream, OutputVersion()) return ExitCodeOK } diff --git a/local.go b/local.go index db5aad8..527e58e 100644 --- a/local.go +++ b/local.go @@ -10,7 +10,7 @@ import ( // LocalAssets contains the local objects to be uploaded func LocalAssets(path string) ([]string, error) { if path == "" { - return make([]string, 0, 0), nil + return []string{}, nil } path, err := filepath.Abs(path) From c79fee28907d06b776c8e8e4403faed382e5b38c Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Tue, 15 Jun 2021 20:59:09 +0900 Subject: [PATCH 2/2] fix typo --- github_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github_test.go b/github_test.go index 9405735..3ecec64 100644 --- a/github_test.go +++ b/github_test.go @@ -122,7 +122,7 @@ func TestGitHubClient_Upload(t *testing.T) { githubClient, ok := client.(*GitHubClient) if !ok { - t.Fatal("Faield to asset to GithubClient") + t.Fatal("Failed to asset to GithubClient") } rc, url, err := githubClient.Repositories.DownloadReleaseAsset(