From 75dd476d71b5d195a1869fd069a583243c06256d Mon Sep 17 00:00:00 2001 From: phoenix Date: Sun, 27 Jul 2025 19:36:32 +0000 Subject: [PATCH] Initial go code (#7) Reviewed-on: https://git.kundeng.us/phoenix/clean_file/pulls/7 Co-authored-by: phoenix Co-committed-by: phoenix --- .gitea/workflows/workflow.yaml | 42 ++++++++++++++++++++++++++++++++++ .gitignore | 2 +- go.mod | 3 +++ main.go | 9 ++++++++ 4 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/workflow.yaml create mode 100644 go.mod create mode 100644 main.go diff --git a/.gitea/workflows/workflow.yaml b/.gitea/workflows/workflow.yaml new file mode 100644 index 0000000..f635eb6 --- /dev/null +++ b/.gitea/workflows/workflow.yaml @@ -0,0 +1,42 @@ +name: Go + +on: + push: + branches: [ main, go_migr ] + pull_request: + branches: [ main, go_migr ] + +jobs: + build: + runs-on: ubuntu-latest # You can change this to macos-latest or windows-latest if needed + + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: '1.24.5' # You can specify a specific version or 'stable' + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... + + - name: Run gofmt (optional) + # Uncomment to check code formatting with gofmt + run: | + if [ -n "$(gofmt -l.)" ]; then + echo "Go code is not formatted. Please run 'gofmt -w.' to fix it." + exit 1 + fi + + - name: Run golint (optional) + # Uncomment to check code style with golint + run: | + if [ -n "$(golint./...)" ]; then + echo "Go code has style issues. Please run 'golint./...' to see them." + exit 1 + fi + diff --git a/.gitignore b/.gitignore index 8b13789..7b79aa2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ - +/clean_file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..fbdcdf7 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module git.kundeng.us/phoenix/clean_file + +go 1.24.5 diff --git a/main.go b/main.go new file mode 100644 index 0000000..d99725f --- /dev/null +++ b/main.go @@ -0,0 +1,9 @@ +package main + +import "fmt" + +const VERSION = "0.4.100" + +func main() { + fmt.Println("clean_file") +}