forked from mirror/jwt
CI check for Go code formatting (#206)
Signed-off-by: jay-dee7 <jasdeepsingh.uppal@gmail.com> Co-authored-by: jay-dee7 <jasdeepsingh.uppal@gmail.com>
This commit is contained in:
parent
f6c6299f67
commit
4426925f0c
|
@ -33,6 +33,13 @@ jobs:
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: "${{ matrix.go }}"
|
go-version: "${{ matrix.go }}"
|
||||||
|
- name: Check Go code formatting
|
||||||
|
run: |
|
||||||
|
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
|
||||||
|
gofmt -s -l .
|
||||||
|
echo "Please format Go code by running: go fmt ./..."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
go vet ./...
|
go vet ./...
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build go1.4
|
||||||
// +build go1.4
|
// +build go1.4
|
||||||
|
|
||||||
package jwt
|
package jwt
|
||||||
|
|
1
token.go
1
token.go
|
@ -7,7 +7,6 @@ import (
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// DecodePaddingAllowed will switch the codec used for decoding JWTs respectively. Note that the JWS RFC7515
|
// DecodePaddingAllowed will switch the codec used for decoding JWTs respectively. Note that the JWS RFC7515
|
||||||
// states that the tokens will utilize a Base64url encoding with no padding. Unfortunately, some implementations
|
// states that the tokens will utilize a Base64url encoding with no padding. Unfortunately, some implementations
|
||||||
// of JWT are producing non-standard tokens, and thus require support for decoding. Note that this is a global
|
// of JWT are producing non-standard tokens, and thus require support for decoding. Note that this is a global
|
||||||
|
|
Loading…
Reference in New Issue