Skip to content

Commit 05e3316

Browse files
committed
added test unused function in main and run staticcheck step to ci.yml
1 parent 7193443 commit 05e3316

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,7 @@ jobs:
3737
run: test -z $(go fmt ./...)
3838

3939
- name: Install staticcheck
40-
run: go install honnef.co/go/tools/cmd/staticcheck@latest
40+
run: go install honnef.co/go/tools/cmd/staticcheck@latest
41+
42+
- name: Run staticcheck
43+
run: staticcheck ./...

main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,8 @@ func main() {
9696
log.Printf("Serving on port: %s\n", port)
9797
log.Fatal(srv.ListenAndServe())
9898
}
99+
100+
func unused() {
101+
// this function does nothing
102+
// and is called nowhere
103+
}

0 commit comments

Comments
 (0)