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
+7.9k Golang : Ways to recover memory during run time.
+6.9k Golang : Calculate BMI and risk category
+14.6k Golang : Execute function at intervals or after some delay
+6.3k Javascript : Generate random key with specific length
+8.6k Python : Fix SyntaxError: Non-ASCII character in file, but no encoding declared
+15.4k Golang : Find location by IP address and display with Google Map
+5.8k Golang : List all packages and search for certain package
+33.7k Golang : All update packages with go get command
+4.1k Javascript : Empty an array example
+5.2k Golang : Issue HTTP commands to server and port example
+5.2k Golang : The Tao of importing package
+18.8k Golang : Implement getters and setters