Code Review
/
nonrtric
/
rapp
/
orufhrecovery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Improve documentation
[nonrtric/rapp/orufhrecovery.git]
/
goversion
/
internal
/
restclient
/
client.go
diff --git
a/goversion/internal/restclient/client.go
b/goversion/internal/restclient/client.go
index
6857209
..
5694898
100644
(file)
--- a/
goversion/internal/restclient/client.go
+++ b/
goversion/internal/restclient/client.go
@@
-42,7
+42,6
@@
func (e RequestError) Error() string {
return fmt.Sprintf("error response with status: %v and body: %v", e.StatusCode, string(e.Body))
}
return fmt.Sprintf("error response with status: %v and body: %v", e.StatusCode, string(e.Body))
}
-// HTTPClient interface
//go:generate mockery --name HTTPClient
type HTTPClient interface {
Get(url string) (*http.Response, error)
//go:generate mockery --name HTTPClient
type HTTPClient interface {
Get(url string) (*http.Response, error)
@@
-66,7
+65,7
@@
func CreateClientCertificate(certPath string, keyPath string) (tls.Certificate,
if cert, err := tls.LoadX509KeyPair(certPath, keyPath); err == nil {
return cert, nil
} else {
if cert, err := tls.LoadX509KeyPair(certPath, keyPath); err == nil {
return cert, nil
} else {
- return tls.Certificate{}, fmt.Errorf("cannot create x509 keypair from cert file %s and key file %s due to: %v", certPath, keyPath, err)
+ return tls.Certificate{}, fmt.Errorf("cannot create x509 key
pair from cert file %s and key file %s due to: %v", certPath, keyPath, err)
}
}
}
}