Skip to content

Commit 11c2bca

Browse files
committed
First commit
0 parents  commit 11c2bca

File tree

8 files changed

+146
-0
lines changed

8 files changed

+146
-0
lines changed

.editorconfig

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# EditorConfig coding styles definitions. For more information about the
2+
# properties used in this file, please see the EditorConfig documentation:
3+
# http://editorconfig.org/
4+
5+
# indicate this is the root of the project
6+
root = true
7+
8+
[*]
9+
charset = utf-8
10+
11+
end_of_line = LF
12+
insert_final_newline = true
13+
trim_trailing_whitespace = true
14+
15+
indent_style = space
16+
indent_size = 2
17+
18+
[Makefile]
19+
indent_style = tab
20+
21+
[*.md]
22+
trim_trailing_whitespace = false
23+
24+
[*.go]
25+
indent_style = tab

.gitattributes

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Automatically normalize line endings for all text-based files
2+
# http://git-scm.com/docs/gitattributes#_end_of_line_conversion
3+
* text=auto
4+
5+
# For the following file types, normalize line endings to LF on checking and
6+
# prevent conversion to CRLF when they are checked out (this is required in
7+
# order to prevent newline related issues)
8+
.* text eol=lf
9+
*.go text eol=lf
10+
*.yml text eol=lf
11+
*.html text eol=lf
12+
*.css text eol=lf
13+
*.js text eol=lf
14+
*.json text eol=lf
15+
LICENSE text eol=lf
16+

.github/workflows/echo.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
jobs:
13+
test:
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest, macos-latest, windows-latest]
17+
# Each major Go release is supported until there are two newer major releases. https://golang.org/doc/devel/release.html#policy
18+
# Echo tests with last four major releases (unless there are pressing vulnerabilities)
19+
# As we depend on `golang.org/x/` libraries which only support last 2 Go releases we could have situations when
20+
# we derive from last four major releases promise.
21+
go: [1.17, 1.18, 1.19]
22+
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
23+
runs-on: ${{ matrix.os }}
24+
steps:
25+
- name: Checkout Code
26+
uses: actions/checkout@v3
27+
with:
28+
ref: ${{ github.ref }}
29+
30+
- name: Set up Go ${{ matrix.go }}
31+
uses: actions/setup-go@v3
32+
with:
33+
go-version: ${{ matrix.go }}
34+
35+
- name: Run Tests
36+
run: go test -race --coverprofile=coverage.coverprofile --covermode=atomic ./...
37+
38+
- name: Install dependencies for checks
39+
run: |
40+
go install golang.org/x/lint/golint@latest
41+
go install honnef.co/go/tools/cmd/staticcheck@latest
42+
43+
- name: Run golint
44+
run: golint -set_exit_status ./...
45+
46+
- name: Run staticcheck
47+
run: staticcheck ./...
48+
49+
- name: Upload coverage to Codecov
50+
if: success() && matrix.go == 1.19 && matrix.os == 'ubuntu-latest'
51+
uses: codecov/codecov-action@v3
52+
with:
53+
token:
54+
fail_ci_if_error: false
55+

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.DS_Store
2+
coverage.txt
3+
_test
4+
vendor
5+
.idea
6+
*.iml
7+
*.out
8+
.vscode

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2021 LabStack
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.

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Echo JWT middleware
2+
3+
## Usage
4+
5+
```bash
6+
go get github.com/labstack/echo-jwt
7+
```

codecov.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
threshold: 1.0%
6+
patch:
7+
default:
8+
threshold: 1.0%
9+
10+
comment:
11+
require_changes: true

go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module github.com/labstack/echo-jwt
2+
3+
go 1.17

0 commit comments

Comments
 (0)