Skip to content

Instantly share code, notes, and snippets.

@lattwood
Created November 25, 2014 14:22
Show Gist options
  • Save lattwood/c57cfc2539897bb7554e to your computer and use it in GitHub Desktop.
Save lattwood/c57cfc2539897bb7554e to your computer and use it in GitHub Desktop.
Golang can't tell the difference between uint16 and int. Any ideas?
~/gopath/src/github.com/therounds/rhazes $ make bin/rhazesd
/Users/logan/gopath/bin/goop go build -o bin/rhazesd ./rhazes
# github.com/therounds/rhazes/rhazes
rhazes/main.go:133: cannot use config.Port (type int) as type uint16 in argument to supercommon.AppServer
rhazes/main.go:139: cannot use config.SSL.Port (type int) as type uint16 in argument to appserver.TLSConfig
goop: Command failed with exit status 2
make: *** [bin/rhazesd] Error 2
✘ ~/gopath/src/github.com/therounds/rhazes $ grep int rhazes/services/config.go
rhazes/services/config.go: Port int
rhazes/services/config.go: Port int
rhazes/services/config.go: Concurrent int
✘ ~/gopath/src/github.com/therounds/rhazes $ make bin/rhazesd
/Users/logan/gopath/bin/goop go build -o bin/rhazesd ./rhazes
# github.com/therounds/rhazes/rhazes
rhazes/main.go:133: cannot use config.Port (type int) as type uint16 in argument to supercommon.AppServer
rhazes/main.go:139: cannot use config.SSL.Port (type int) as type uint16 in argument to appserver.TLSConfig
goop: Command failed with exit status 2
make: *** [bin/rhazesd] Error 2
✘ ~/gopath/src/github.com/therounds/rhazes $ grep int rhazes/services/config.go
rhazes/services/config.go: Port uint16
rhazes/services/config.go: Port uint16
rhazes/services/config.go: Concurrent int
✘ ~/gopath/src/github.com/therounds/rhazes $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment