From 1de6609073f4274ee5691cfe46586b04d22366ef Mon Sep 17 00:00:00 2001 From: Chris Spitzenberger <43446469+spitzzz@users.noreply.github.com> Date: Mon, 16 May 2022 11:44:18 -0500 Subject: [PATCH] BUGFIX - Add missing triggers for lint workflow + fix for fatalf logging of failed compileTime parse (#62) * Add missing triggers for lint workflow * fix log fatal message for parsing date --- .github/workflows/lint.yml | 4 +++- main.go | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3dc02b5..f33e2db 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,6 +1,8 @@ name: Lint -on: [push] +on: + push: { branches: [main] } + pull_request: { branches: [main] } jobs: lint: diff --git a/main.go b/main.go index c600ebf..ea2c1f0 100644 --- a/main.go +++ b/main.go @@ -4,7 +4,6 @@ import ( "log" "os" "time" - "fmt" "github.com/urfave/cli/v2" @@ -19,7 +18,7 @@ var date = "2006-01-02T15:04:05Z" func main() { compileTime, err := time.Parse(time.RFC3339, date) if err != nil { - log.Fatal(fmt.Sprintf("Could not parse compilation date: %v", err)) + log.Fatalf("Could not parse compilation date: %v", err) } app := &cli.App{ Name: "spacectl",