diff --git a/authority/authority_test.go b/authority/authority_test.go index 973e7a9c..5ad7b747 100644 --- a/authority/authority_test.go +++ b/authority/authority_test.go @@ -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) } diff --git a/authority/poolhttp/poolhttp.go b/authority/poolhttp/poolhttp.go index d639bcf4..10e14194 100644 --- a/authority/poolhttp/poolhttp.go +++ b/authority/poolhttp/poolhttp.go @@ -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) {