Skip to content

Commit

Permalink
fix: add init mod
Browse files Browse the repository at this point in the history
  • Loading branch information
Norton-Lin committed Nov 18, 2024
1 parent a8ad4fe commit f527513
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/go_fmt_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.20" # 使用稳定的 Go 版本
go-version: "1.22" # 使用稳定的 Go 版本

- name: Check Go formatting
run: |
go fmt ./...
cd ../../src
go fmt ./
git diff --exit-code || (echo "❌ Go files are not properly formatted. Run 'go fmt' locally to fix." && exit 1)
3 changes: 3 additions & 0 deletions src/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module main

go 1.22.2
4 changes: 4 additions & 0 deletions src/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package main

func main() {
}

0 comments on commit f527513

Please sign in to comment.