cmd/jwt/main.go
func doDec(signer jwt.Signer, in []byte) ([]byte, error) {
	var err error

	// decode token
	ut := UnstructuredToken{}
	err = signer.Decode(bytes.TrimSpace(in), &ut)
	if err != nil {
		return nil, err
	}

	// pretty format output
	out, err := json.MarshalIndent(&ut, "", "  ")
	if err != nil {
		return nil, err
	}

	return out, nil
}
func doDec(signer jwt.Signer, in []byte) ([]byte, error) {
	var err error

	// decode token
	ut := UnstructuredToken{}
	err = signer.Decode(bytes.TrimSpace(in), &ut)
	if err != nil {
		return nil, err
	}

	// pretty format output
	out, err := json.MarshalIndent(&ut, "", "  ")
	if err != nil {
		return nil, err
	}

	return out, nil
}
func doDec ( signer jwt . Signer , in [ ] byte ) ( [ ] byte , error ) { var err error // decode token ut := UnstructuredToken { } err = signer . Decode ( bytes . TrimSpace ( in ) , & ut ) if err != nil { return nil , err } // pretty format output out , err := json . MarshalIndent ( & ut , " " , " " ) if err != nil { return nil , err } return out , nil }
// doDec decodes in as a JWT.
doDec decodes in as a JWT .