Golang net/http.ParseHTTPVersion() function example
package net/http
Golang net/http.ParseHTTPVersion() function usage example
package main
import (
"fmt"
"net/http"
)
func main() {
fmt.Println("Hello, playground")
major, minor, ok := http.ParseHTTPVersion("HTTP/1.0")
fmt.Printf("major : %d, minor : %d, ok : %v", major, minor, ok)
}
Output :
Hello, playground
major : 1, minor : 0, ok : true
Reference :
Advertisement
Something interesting
Tutorials
+11k Golang : Create S3 bucket with official aws-sdk-go package
+41.4k Golang : Convert string to array/slice
+9.5k Golang : Get all countries currencies code in JSON format
+34.1k Golang : Create x509 certificate, private and public keys
+11.6k Get form post value in Go
+7.4k Android Studio : How to detect camera, activate and capture example
+4.3k Javascript : How to show different content with noscript?
+19.8k Golang : Append content to a file
+22.9k Golang : Test file read write permission example
+8.3k Useful methods to access blocked websites
+5.2k PHP : See installed compiled-in-modules
+11k Golang : Generate random elements without repetition or duplicate