Ajout d'une panic en cas de clé hmac non renseignée
This commit is contained in:
parent
b6c26a2285
commit
1c0b02c9b4
@ -16,6 +16,9 @@ type Client struct {
|
||||
}
|
||||
|
||||
func NewClient(hmacKey string, maxNumber int64, algorithm string, salt string, expire string, checkExpire bool) *Client {
|
||||
if len(hmacKey) == 0 {
|
||||
panic("HMAC key not found in env")
|
||||
}
|
||||
return &Client {
|
||||
hmacKey: hmacKey,
|
||||
maxNumber: maxNumber,
|
||||
|
Loading…
Reference in New Issue
Block a user