kennylevinsen / serve2d

Protocol detecting server
MIT License
575 stars 16 forks source link

tlsmatcher.go:114:20: error: reference to undefined field or method ‘Version’ #8

Open butisitreally opened 7 years ago

butisitreally commented 7 years ago

When I try to run/build this on ‘go version xgcc (Ubuntu 4.9.3-0ubuntu4) 4.9.3 linux/amd64‘, 'OpenSSL 1.0.1f 6 Jan 2014', i get this error:

# github.com/joushou/serve2/proto
../serve2/proto/tlsmatcher.go:114:20: error: reference to undefined field or method ‘Version’
    if version == cs.Version {

Is there something missing from my setup? Thanks.

kennylevinsen commented 7 years ago

You're using an old (?) version of go (gccgo it seems?) which does not have "Version" in crypto/tls.ConnectionState. Using a normal release version of go should work (Any between 1.4 to and including the most recent one should do the trick). Alternatively, update your gccgo.