my go version is "go version go1.9.4 linux/amd64" On running "go get -u google.golang.org/grpc", a "go" drectory gets created in my HOME and i get the following messages

google.golang.org/grpc/internal/credentials

go/src/google.golang.org/grpc/internal/credentials/spiffe.go:39:70: state.PeerCertificates[0].URIs undefined (type *x509.Certificate has no field or method URIs) go/src/google.golang.org/grpc/internal/credentials/spiffe.go:48:24: cert.URIs undefined (type *x509.Certificate has no field or method URIs) go/src/google.golang.org/grpc/internal/credentials/spiffe.go:52:26: cert.URIs undefined (type *x509.Certificate has no field or method URIs) go/src/google.golang.org/grpc/internal/credentials/spiffe.go:70:14: cert.URIs undefined (type *x509.Certificate has no field or method URIs)

its giving the same error if i try to run a grpc server boiler plate code

1

There are 1 best solutions below

0
On BEST ANSWER

Go 1.9 is too old to build that package. The URIs field is documented as having been added to the Certificate struct in Go 1.10 (released in early 2018).