Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/go-fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Go Fix and Format

on:
push:
branches-ignore:
- '**-fix'

jobs:
fix:
name: Fix and Format
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Run Go Format
run: go fmt ./...

- name: Run Go Fix
run: go fix ./...

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: "chore: apply go fmt and go fix"
title: "chore: apply go fmt and go fix"
body: "This PR applies changes from `go fmt` and `go fix`."
branch: "${{ github.ref_name }}-fix"
base: "${{ github.ref_name }}"
delete-branch: true
22 changes: 22 additions & 0 deletions .github/workflows/secret-leaks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Secret Leaks Check

on:
push:
branches: [ "**" ]
pull_request:
branches: [ "**" ]

jobs:
gitleaks:
name: Gitleaks
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Run Gitleaks
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43 changes: 43 additions & 0 deletions .github/workflows/test-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test and Lint

on:
push:
branches: [ "**" ]
pull_request:
branches: [ "**" ]

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Run Tests
run: go test -v ./...

- name: Run Vet
run: go vet ./...

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
4 changes: 0 additions & 4 deletions gosm.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ func (array ParamArray) AuthBytes() []byte {
return []byte("")
}
var buf bytes.Buffer
keys := make([]string, 0, len(array))
for _, k := range array {
keys = append(keys, k[0])
}
sort.Sort(array)
for _, k := range array {
prefix := Escape(k[0]) + "="
Expand Down
Loading