| Server IP : 217.160.0.212 / Your IP : 216.73.217.5 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1073854427 ( 1073854427) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/go-1.23/src/cmd/link/internal/ld/testdata/httptest/main/ |
Upload File : |
// A small test program that uses the net/http package. There is
// nothing special about net/http here, this is just a convenient way
// to pull in a lot of code.
package main
import (
"net/http"
"net/http/httptest"
)
type statusHandler int
func (h *statusHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(int(*h))
}
func main() {
status := statusHandler(http.StatusNotFound)
s := httptest.NewServer(&status)
defer s.Close()
}