aboutsummaryrefslogtreecommitdiff
path: root/src/net/http/httptest/server.go
diff options
context:
space:
mode:
authorcui fliter <imcusg@gmail.com>2023-11-06 22:58:32 +0800
committerGopher Robot <gobot@golang.org>2024-01-10 03:29:50 +0000
commit1d45a7ef560a76318ed59dfdb178cecd58caf948 (patch)
tree414cefb1ad932567af40cb3ab7781bed7cc76182 /src/net/http/httptest/server.go
parentdcbe77246922fe7ef41f07df228f47a37803f360 (diff)
downloadgo-1d45a7ef560a76318ed59dfdb178cecd58caf948.tar.xz
net: add available godoc link
Change-Id: Ib7c4baf0247c421954aedabfbb6a6af8a08a8936 Reviewed-on: https://go-review.googlesource.com/c/go/+/540021 Reviewed-by: Damien Neil <dneil@google.com> Run-TryBot: shuang cui <imcusg@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'src/net/http/httptest/server.go')
-rw-r--r--src/net/http/httptest/server.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net/http/httptest/server.go b/src/net/http/httptest/server.go
index c962749e85..5095b438ec 100644
--- a/src/net/http/httptest/server.go
+++ b/src/net/http/httptest/server.go
@@ -100,7 +100,7 @@ func strSliceContainsPrefix(v []string, pre string) bool {
return false
}
-// NewServer starts and returns a new Server.
+// NewServer starts and returns a new [Server].
// The caller should call Close when finished, to shut it down.
func NewServer(handler http.Handler) *Server {
ts := NewUnstartedServer(handler)
@@ -108,7 +108,7 @@ func NewServer(handler http.Handler) *Server {
return ts
}
-// NewUnstartedServer returns a new Server but doesn't start it.
+// NewUnstartedServer returns a new [Server] but doesn't start it.
//
// After changing its configuration, the caller should call Start or
// StartTLS.
@@ -185,7 +185,7 @@ func (s *Server) StartTLS() {
s.goServe()
}
-// NewTLSServer starts and returns a new Server using TLS.
+// NewTLSServer starts and returns a new [Server] using TLS.
// The caller should call Close when finished, to shut it down.
func NewTLSServer(handler http.Handler) *Server {
ts := NewUnstartedServer(handler)
@@ -298,7 +298,7 @@ func (s *Server) Certificate() *x509.Certificate {
// Client returns an HTTP client configured for making requests to the server.
// It is configured to trust the server's TLS test certificate and will
-// close its idle connections on Server.Close.
+// close its idle connections on [Server.Close].
func (s *Server) Client() *http.Client {
return s.client
}