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
+32.5k Golang : Copy directory - including sub-directories and files
+27.5k Golang : dial tcp: too many colons in address
+26.8k Golang : Find files by extension
+18.7k Golang : Iterating Elements Over A List
+30.9k error: trying to remove "yum", which is protected
+32.7k Golang : Regular Expression for alphanumeric and underscore
+7.1k Golang : Get environment variable
+7.1k Golang : Array mapping with Interface
+12.2k Golang : Detect user location with HTML5 geo-location
+9.7k Golang : List available AWS regions
+24.5k Golang : Time slice or date sort and reverse sort example
+7.9k Golang : Ways to recover memory during run time.