Open a-gierczak opened 1 month ago
Pretty small change request, to make errors returned by URLSignerHMAC.KeyFromURL identifiable by errors.Is
errors.Is
https://github.com/google/go-cloud/blob/master/blob/fileblob/fileblob.go#L1021
I'd change the returned errors in the linked function to:
var ( ErrSignatureExpired = errors.New("signature expired") ErrInvalidSignature = errors.New("invalid signature") ) ... if err != nil || time.Now().Unix() > exp { return "", ErrSignatureExpired } if !h.checkMAC(q) { return "", ErrInvalidSignature }
Custom URLSigner implementation - but it's such a minor thing, that it'd be an overkill not to use the built-in one :)
This doesn't seem portable; other providers just return an error. How would you use this?
Is your feature request related to a problem? Please describe.
Pretty small change request, to make errors returned by URLSignerHMAC.KeyFromURL identifiable by
errors.Is
Describe the solution you'd like
https://github.com/google/go-cloud/blob/master/blob/fileblob/fileblob.go#L1021
I'd change the returned errors in the linked function to:
Describe alternatives you've considered
Custom URLSigner implementation - but it's such a minor thing, that it'd be an overkill not to use the built-in one :)