Skip to content

Commit

Permalink
fix: added gofmt to action (#660)
Browse files Browse the repository at this point in the history
* fix: added gofmt to action

* refactor: Moved gofmt action

Co-authored-by: Xuanwo <[email protected]>
  • Loading branch information
burntcarrot and Xuanwo authored Jul 13, 2021
1 parent a8674d8 commit 96ab6c0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/gofmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "gofmt"

on: [ push,pull_request ]

jobs:
gofmt:
name: gofmt
runs-on: ubuntu-latest

steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: "1.15"

- name: Checkout repository
uses: actions/checkout@v2

- name: Format
run: if [ "$(gofmt -l . | wc -l)" -gt 0 ]; then exit 1; fi

0 comments on commit 96ab6c0

Please sign in to comment.