Standard library / net/http
http.StatusCreated
HTTP status 201. One or more resources were created; Location may identify the primary resource. Expected stdout: '201\n'.
Formal Syntax & Structure
go syntaxgo
const StatusCreated = 201Working Example
Example Snippetgo
package main
import ( "fmt" "net/http")
func main() { fmt.Println(http.StatusCreated) }
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) }}