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
+5.4k Python : Delay with time.sleep() function example
+6.4k Golang : Break string into a slice of characters example
+10.1k Golang : Print how to use flag for your application example
+4.5k Java : Generate multiplication table example
+6.1k Golang : Grab news article text and use NLP to get each paragraph's sentences
+4.6k Linux : sudo yum updates not working
+9.4k Golang : Launch Mac OS X Preview (or other OS) application from your program example
+6.2k Golang : Extract XML attribute data with attr field tag example
+17.9k Golang : Qt image viewer example
+20.3k Swift : Convert (cast) Int to int32 or Uint32
+6.1k Golang : Build new URL for named or registered route with Gorilla webtoolkit example
+9k Golang : Capture text return from exec function example