On Monday, April 1, 2019 at 9:01:28 AM UTC-4, Jakob Borg wrote: > > On 1 Apr 2019, at 11:22, T L <tapi...@gmail.com <javascript:>> wrote: > > > How to use this package in vgo mode? > > > go mod init a.b.c/ddd > go get github.com/projectcalico/libcalico-go@master > > The problem is that their latest non-prerelease tag is v1.7.3, which is > several years old and doesn’t contain the package you want to import. > > //jb >
There are still some problems: $ cat main.go package main import _ "github.com/projectcalico/libcalico-go/lib/apiconfig" import _ "github.com/projectcalico/libcalico-go/lib/clientv3" func main() { } $ cat go.mod module a.b.c/ddd require ( github.com/projectcalico/libcalico-go v3.7.0-0.dev+incompatible ) go 1.12 $ go build go: finding github.com/coreos/etcd/clientv3 latest go: finding github.com/coreos/etcd/mvcc/mvccpb latest go: finding github.com/coreos/etcd/mvcc latest go: finding k8s.io/apimachinery/pkg/runtime/schema latest go: finding k8s.io/apimachinery/pkg/runtime/serializer latest go: finding k8s.io/apimachinery/pkg/runtime latest go: finding k8s.io/apimachinery/pkg/apis/meta latest go: finding k8s.io/apimachinery/pkg/util/validation latest go: finding k8s.io/apimachinery/pkg/util/uuid latest go: finding k8s.io/api/core latest go: finding k8s.io/client-go/kubernetes latest go: finding k8s.io/client-go/plugin/pkg/client/auth latest go: finding k8s.io/client-go/tools/clientcmd latest go: finding k8s.io/apimachinery/pkg latest go: finding k8s.io/apimachinery/pkg/apis latest go: finding k8s.io/apimachinery/pkg/util latest go: finding k8s.io/api latest go: finding github.com/coreos/etcd/pkg/transport latest go: finding github.com/coreos/etcd/pkg latest go: finding k8s.io/apimachinery latest go: finding k8s.io/client-go/plugin/pkg/client latest go: finding k8s.io/client-go/tools latest go: finding k8s.io/apimachinery/pkg/api/meta latest go: finding k8s.io/apimachinery/pkg/types latest go: finding k8s.io/apimachinery/pkg/util/intstr latest go: finding k8s.io/apimachinery/pkg/api/errors latest go: finding k8s.io/client-go/plugin/pkg latest go: finding k8s.io/apimachinery/pkg/api latest go: finding k8s.io/api/networking latest go: finding k8s.io/apimachinery/pkg/watch latest go: finding k8s.io/client-go/plugin latest go: finding k8s.io/client-go/tools/cache latest go: finding k8s.io/client-go/rest latest go: finding k8s.io/apimachinery/pkg/fields latest go: finding k8s.io/client-go/kubernetes/scheme latest go: finding github.com/projectcalico/go-yaml-wrapper latest go: finding golang.org/x/net/http2 latest go: finding golang.org/x/net latest go: finding github.com/projectcalico/go-json/json latest go: finding github.com/projectcalico/go-yaml latest go: finding github.com/projectcalico/go-json latest go: finding k8s.io/api/admissionregistration/v1alpha1 latest go: finding github.com/Azure/go-autorest/autorest latest go: finding github.com/gogo/protobuf/proto latest go: finding github.com/gogo/protobuf/gogoproto latest go: finding github.com/Azure/go-autorest/autorest/adal latest go: finding k8s.io/api/admissionregistration latest go: finding github.com/Azure/go-autorest/autorest/azure latest go: finding github.com/golang/protobuf/proto latest go: finding github.com/google/gofuzz latest go: finding golang.org/x/net/context latest go: finding github.com/gogo/protobuf/sortkeys latest go: finding golang.org/x/oauth2 latest go: finding github.com/googleapis/gnostic/OpenAPIv2 latest go: finding golang.org/x/oauth2/google latest go: finding github.com/gregjones/httpcache/diskcache latest go: finding github.com/gregjones/httpcache latest go: finding google.golang.org/grpc/codes latest go: finding google.golang.org/grpc/credentials latest go: finding google.golang.org/grpc/grpclog latest go: finding google.golang.org/grpc/metadata latest go: finding google.golang.org/grpc/status latest go: finding google.golang.org/grpc/keepalive latest go: finding github.com/gophercloud/gophercloud/openstack latest go: finding github.com/gophercloud/gophercloud latest go: finding google.golang.org/grpc/health/grpc_health_v1 latest go: finding google.golang.org/grpc/health latest go: finding golang.org/x/time/rate latest go: finding golang.org/x/time latest go: finding github.com/modern-go/concurrent latest go: finding go.opencensus.io/plugin/ochttp latest go: finding go.opencensus.io/stats/view latest go: finding go.opencensus.io/trace latest go: finding go.opencensus.io/plugin/ochttp/propagation/tracecontext latest go: finding go.opencensus.io/plugin latest go: finding go.opencensus.io/stats latest go: finding go.opencensus.io/plugin/ochttp/propagation latest go: finding github.com/grpc-ecosystem/grpc-gateway/runtime latest go: finding github.com/grpc-ecosystem/grpc-gateway/utilities latest build a.b.c/ddd: cannot load k8s.io/api/admissionregistration/v1alpha1: cannot find module providing package k8s.io/api/admissionregistration/v1alpha1 It looks the problem is the same as the old one. It should be possible that I can find the proper versions for the indirect dependencies. The libcalico-go project uses glide as the dependency tool. There is a glide.lock file. The go command should get the indirect dependency version there, instead of failing to exit and letting uses to find the proper versions. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.