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
+22.5k Golang : Convert Unix timestamp to UTC timestamp
+9.2k Golang : Create and shuffle deck of cards example
+5.1k Golang : Check if a word is countable or not
+5.2k Golang : Calculate half life decay example
+11.6k Golang : Fuzzy string search or approximate string matching example
+4.7k Linux/MacOSX : How to symlink a file?
+9k Golang : Populate or initialize struct with values example
+30k Golang : Get time.Duration in year, month, week or day
+11.5k CodeIgniter : Import Linkedin data
+9.7k Golang : Eroding and dilating image with OpenCV example
+12.8k Golang : Listen and Serve on sub domain example
+8.6k Android Studio : Import third-party library or package into Gradle Scripts