mirror of
https://github.com/documize/community.git
synced 2025-07-31 11:09:42 +02:00
upgraded vendored jwt-go lib
This commit is contained in:
parent
b5f85637a7
commit
8aeb3eaec4
34 changed files with 1752 additions and 341 deletions
23
vendor/github.com/dgrijalva/jwt-go/cmd/jwt/args.go
generated
vendored
Normal file
23
vendor/github.com/dgrijalva/jwt-go/cmd/jwt/args.go
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type ArgList map[string]string
|
||||
|
||||
func (l ArgList) String() string {
|
||||
data, _ := json.Marshal(l)
|
||||
return string(data)
|
||||
}
|
||||
|
||||
func (l ArgList) Set(arg string) error {
|
||||
parts := strings.SplitN(arg, "=", 2)
|
||||
if len(parts) != 2 {
|
||||
return fmt.Errorf("Invalid argument '%v'. Must use format 'key=value'. %v", arg, parts)
|
||||
}
|
||||
l[parts[0]] = parts[1]
|
||||
return nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue