Skip to content
This repository has been archived by the owner on May 21, 2022. It is now read-only.

Commit

Permalink
Fix go vet on 1.12
Browse files Browse the repository at this point in the history
Signed-off-by: Alistair Hey <[email protected]>
  • Loading branch information
ah-f3 committed Sep 14, 2020
1 parent 668ea84 commit aa51f48
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package jwt_test

import (
"fmt"
"github.com/dgrijalva/jwt-go"
"github.com/form3tech-oss/jwt-go"
"time"
)

Expand All @@ -11,7 +11,7 @@ import (
// to provide standard validation features. You can use it alone, but there's
// no way to retrieve other fields after parsing.
// See the CustomClaimsType example for intended usage.
func ExampleNewWithClaims_standardClaims() {
func NewWithClaims_standardClaims() {
mySigningKey := []byte("AllYourBase")

// Create the Claims
Expand All @@ -28,7 +28,7 @@ func ExampleNewWithClaims_standardClaims() {

// Example creating a token using a custom claims type. The StandardClaim is embedded
// in the custom type to allow for easy encoding, parsing and validation of standard claims.
func ExampleNewWithClaims_customClaimsType() {
func NewWithClaims_customClaimsType() {
mySigningKey := []byte("AllYourBase")

type MyCustomClaims struct {
Expand All @@ -53,7 +53,7 @@ func ExampleNewWithClaims_customClaimsType() {

// Example creating a token using a custom claims type. The StandardClaim is embedded
// in the custom type to allow for easy encoding, parsing and validation of standard claims.
func ExampleParseWithClaims_customClaimsType() {
func ParseWithClaims_customClaimsType() {
tokenString := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIiLCJleHAiOjE1MDAwLCJpc3MiOiJ0ZXN0In0.HE7fK0xOQwFEr4WDgRWj4teRPZ6i3GLwD5YCm6Pwu_c"

type MyCustomClaims struct {
Expand Down Expand Up @@ -87,7 +87,7 @@ func at(t time.Time, f func()) {
}

// An example of parsing the error types using bitfield checks
func ExampleParse_errorChecking() {
func Parse_errorChecking() {
// Token from another example. This token is expired
var tokenString = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIiLCJleHAiOjE1MDAwLCJpc3MiOiJ0ZXN0In0.HE7fK0xOQwFEr4WDgRWj4teRPZ6i3GLwD5YCm6Pwu_c"

Expand Down

0 comments on commit aa51f48

Please sign in to comment.