Skip to content

Commit

Permalink
produce a staticcheck failure, using setup-go
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Mar 7, 2021
1 parent 74073fe commit 943fab3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/go-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ jobs:
name: Go checks
steps:
- uses: actions/checkout@v2
- uses: WillAbides/setup-go-faster@34c5f5ac9e57768758df0a2ef40b598b3572b11b # v1.5.0
- uses: actions/setup-go@v2
with:
go-version: "1.16.x"
- run: echo $PATH
- run: echo $GOROOT
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@be534f007836a777104a15f2456cd1fffd3ddee8 # v2020.2.2
- run: go vet ./...
- run: staticcheck ./...
- run: staticcheck ./... | sed -e "s/\(.*\)\.go/.\/\1.go/g"
9 changes: 8 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
package main

import "fmt"
import (
"sync"
"fmt"
)

func main() {
fmt.Println("hello")
fmt.Println("bye")
}

func mult(a, b int) int {
var l sync.Mutex
l.Lock()
l.Unlock()

return a * b
}

0 comments on commit 943fab3

Please sign in to comment.