Apply suggestions from code review

Co-authored-by: Herman Slatman <hslatman@users.noreply.github.com>
This commit is contained in:
Mariano Cano
2025-07-02 10:48:37 -07:00
committed by GitHub
parent b690e1214d
commit 2b13b82ee3
2 changed files with 6 additions and 6 deletions

View File

@@ -28,8 +28,8 @@ import (
func TestMain(m *testing.M) {
if err := initializeSystemCertPool(); err != nil {
fmt.Fprintln(os.Stderr, "failed to initialize system cert pool:", err)
fmt.Fprintln(os.Stderr, "See https://pkg.go.dev/github.com/tjfoc/gmsm/x509#SystemCertPool\n", err)
fmt.Fprintf(os.Stderr, "failed to initialize system cert pool: %v\n", err)
fmt.Fprintln(os.Stderr, "See https://pkg.go.dev/crypto/x509#SystemCertPool")
os.Exit(2)
}

View File

@@ -7,14 +7,14 @@ import (
"github.com/smallstep/certificates/internal/httptransport"
)
// Transporter is the implemented by custom HTTP clients with a method that
// Transporter is implemented by custom HTTP clients with a method that
// returns an [*http.Transport].
type Transporter interface {
Transport() *http.Transport
}
// Client returns an HTTP client that uses a [sync.Pool] to create new HTTP
// client. It implements the [provisioner.HTTPClient] and [Transporter]
// Client is an HTTP client that uses a [sync.Pool] to create new and reuse HTTP
// clients. It implements the [provisioner.HTTPClient] and [Transporter]
// interfaces. This is the HTTP client used by the provisioners.
type Client struct {
pool sync.Pool
@@ -38,7 +38,7 @@ func (c *Client) SetNew(fn func() *http.Client) {
}
}
// Get issues a GET to the specified URL. If the response is one of the
// Get issues a GET request to the specified URL. If the response is one of the
// following redirect codes, Get follows the redirect after calling the
// [Client.CheckRedirect] function:
func (c *Client) Get(u string) (resp *http.Response, err error) {