Predeclared type
Go uint16 type
Unsigned 16-bit integer, range 0 to 65535. Useful for fixed-width unsigned fields; negative constants cannot initialize it. Example output: '65535'.
Formal Syntax & Structure
go syntaxgo
uint16Working Example
Example Snippetgo
package main
import ( "fmt")
func main() { var port uint16 = 65535 fmt.Println(port)}