Standard library / net/http

http.StatusOK

HTTP status 200. The request succeeded; the body meaning depends on the method. Expected stdout: '200\n'.

Formal Syntax & Structure

go syntaxgo
const StatusOK = 200

Working Example

Example Snippetgo
package main
import (  "fmt"  "net/http")
func main() { fmt.Println(http.StatusOK) }
func must[T any](v T, e error) T {  if e != nil {    panic(e)  }  return v}func check(e error) {  if e != nil {    panic(e)  }}
Go Reference