Skip to content

Commit fd60d50

Browse files
committed
init
0 parents  commit fd60d50

12 files changed

+582
-0
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
- package-ecosystem: gomod
8+
directory: /
9+
schedule:
10+
interval: weekly

.github/workflows/auto-merge.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Auto-merge
2+
on: pull_request
3+
permissions:
4+
contents: write
5+
pull-requests: write
6+
jobs:
7+
dependabot:
8+
runs-on: ubuntu-latest
9+
if: ${{ github.actor == 'dependabot[bot]' }}
10+
steps:
11+
- uses: dependabot/fetch-metadata@v1
12+
with:
13+
github-token: ${{ secrets.GITHUB_TOKEN }}
14+
- name: Run gh pr merge
15+
run: |
16+
gh pr merge --auto --merge "${{ github.event.pull_request.html_url }}"
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-go@v4
15+
with:
16+
go-version: 1.22
17+
- uses: golangci/golangci-lint-action@v3.4.0
18+
- run: make test

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# IDE
2+
.idea/
3+
.vscode/
4+
5+
# macOS
6+
.DS_Store
7+
8+
# go
9+
vendor/

.golangci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
run:
2+
timeout: 5m
3+
linters:
4+
enable:
5+
- dupl
6+
- exportloopref
7+
- gocyclo
8+
- gosec
9+
- gocritic
10+
- goconst
11+
- importas
12+
- gosimple
13+
- staticcheck
14+
- unused
15+
- nakedret
16+
- nolintlint
17+
- prealloc
18+
- revive
19+
- unconvert
20+
- tenv
21+
- testpackage
22+
- thelper
23+
- godot
24+
- gofmt
25+
- goimports
26+
- misspell
27+
- gofumpt
28+
- whitespace

.pre-commit-config.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
repos:
2+
- repo: https://github.com/frantjc/pre-commit-hooks
3+
rev: v1.0.0
4+
hooks:
5+
- id: go-fmt
6+
- id: golangci-lint
7+
- id: go-test
8+
- repo: https://github.com/pre-commit/pre-commit-hooks
9+
rev: v4.3.0
10+
hooks:
11+
- id: trailing-whitespace
12+
- id: check-yaml
13+
- id: check-merge-conflict
14+
- id: check-shebang-scripts-are-executable
15+
- id: end-of-file-fixer

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Alex Logsdon
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
GO = go
2+
GOLANGCI-LINT = golangci-lint
3+
4+
.DEFAULT: test
5+
6+
fmt generate test:
7+
@$(GO) $@ ./...
8+
9+
download vendor verify:
10+
@$(GO) mod $@
11+
12+
lint:
13+
@$(GOLANGCI-LINT) run --fix
14+
15+
gen: generate
16+
dl: download
17+
ven: vendor
18+
ver: verify
19+
format: fmt
20+
21+
.PHONY: fmt test download vendor verify lint dl ven ver format

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# go-encoding-vdf
2+
3+
Go module to decode Valve Data Format with a similar API to the Go standard library's `encoding/json`.
4+
5+
## install
6+
7+
```sh
8+
go get github.com/frantjc/go-encoding-vdf
9+
```

0 commit comments

Comments
 (0)