diff --git a/.air.toml b/.air.toml new file mode 100644 index 0000000..76ddd12 --- /dev/null +++ b/.air.toml @@ -0,0 +1,52 @@ +root = "." +testdata_dir = "testdata" +tmp_dir = "tmp" + +[build] + args_bin = [] + bin = "bin/proxy" + cmd = "go build -o bin/proxy ." + delay = 1000 + exclude_dir = ["assets", "tmp", "vendor", "testdata"] + exclude_file = [] + exclude_regex = ["_test.go"] + exclude_unchanged = false + follow_symlink = false + full_bin = "" + include_dir = [] + include_ext = ["go", "tpl", "tmpl", "html"] + include_file = [] + kill_delay = "0s" + log = "build-errors.log" + poll = false + poll_interval = 0 + post_cmd = [] + pre_cmd = [] + rerun = false + rerun_delay = 500 + send_interrupt = false + stop_on_error = false + +[color] + app = "" + build = "yellow" + main = "magenta" + runner = "green" + watcher = "blue" + +[log] + main_only = false + silent = false + time = false + +[misc] + clean_on_exit = false + +[proxy] + app_port = 0 + enabled = false + proxy_port = 0 + +[screen] + clear_on_rebuild = true + keep_scroll = true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..616b545 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,30 @@ +name: 🔨 Lint + +on: + pull_request: + branches: ["master"] + +permissions: + contents: read + pull-requests: read + +jobs: + golangci: + strategy: + matrix: + go: [stable] + os: [ubuntu-latest, macos-latest] + name: lint + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - name: "Setup Go" + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go }} + + - name: Lint + uses: golangci/golangci-lint-action@v8 + with: + version: v2.6.2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..10245ca --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +# binary +/bin + +# temp +/tmp + +# env +*.env diff --git a/watch.bash b/watch.bash new file mode 100644 index 0000000..1baffe5 --- /dev/null +++ b/watch.bash @@ -0,0 +1,3 @@ +#!/bin/env bash +echo "running air watch..." +air