- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for StatusNotFound (1.91 sec)
-
src/cmd/link/internal/ld/testdata/httptest/main/main.go
"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()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Feb 20 15:46:11 UTC 2019 - 464 bytes - Viewed (0) -
src/database/sql/example_service_test.go
} type Service struct { db *sql.DB } func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request) { db := s.db switch r.URL.Path { default: http.Error(w, "not found", http.StatusNotFound) return case "/healthz": ctx, cancel := context.WithTimeout(r.Context(), 1*time.Second) defer cancel() err := s.db.PingContext(ctx) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Feb 28 20:21:26 UTC 2024 - 4K bytes - Viewed (0) -
src/cmd/go/internal/web/http.go
if err != nil { return nil, err } f, err := os.Open(path) if os.IsNotExist(err) { return &Response{ URL: u.Redacted(), Status: http.StatusText(http.StatusNotFound), StatusCode: http.StatusNotFound, Body: http.NoBody, fileErr: err, }, nil } if os.IsPermission(err) { return &Response{ URL: u.Redacted(),
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 10 17:34:27 UTC 2023 - 9.7K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/mod/sumdb/server.go
// The caller must only call reportError in contexts where // a not-found err should be reported as 404. func reportError(w http.ResponseWriter, err error) { if os.IsNotExist(err) { http.Error(w, err.Error(), http.StatusNotFound) return } http.Error(w, err.Error(), http.StatusInternalServerError)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jul 12 20:38:21 UTC 2023 - 4.9K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"StatusNetworkAuthenticationRequired", Const, 6}, {"StatusNoContent", Const, 0}, {"StatusNonAuthoritativeInfo", Const, 0}, {"StatusNotAcceptable", Const, 0}, {"StatusNotExtended", Const, 7}, {"StatusNotFound", Const, 0}, {"StatusNotImplemented", Const, 0}, {"StatusNotModified", Const, 0}, {"StatusOK", Const, 0}, {"StatusPartialContent", Const, 0}, {"StatusPaymentRequired", Const, 0},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)