gocql软件包golang在同一安装中的两个文件版本

吉姆·琼斯(Jim Jones):

尝试运行Go文件(应运行)时出现此错误

clusterCfg.ConnectTimeout undefined (type *gocql.ClusterConfig has no field 
or method ConnectTimeout)
  1. 当我查看go 1.7的文档时,我发现ClusterConfig确实有一个ConnectTimeout字段。(版本= 1.7)。
  2. 如果我转到go路径中的github.com目录,则会找到目录gocql。在此目录中,我找到一个文件cluster.go,其中包含结构ClusterConfig的定义,该结构没有ConnectTimeout字段,而是一个Timeout字段。

go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/developer/gocode"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-
map=/tmp/go-build098468995=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"

    {
        "Dir": "/home/developer/gocode/src/github.com/gocql/gocql",
        "ImportPath": "github.com/gocql/gocql",
        "Name": "gocql",
        "Doc": "Package gocql implements a fast and robust Cassandra driver 
         for the Go programming language.",
        "Target": 
        "/home/developer/gocode/pkg/linux_amd64/github.com/gocql/gocql.a",
        "Root": "/home/developer/gocode",
        "GoFiles": [
            "address_translators.go",
            "cluster.go",
            "compressor.go",
            "conn.go",
            "connectionpool.go",
            "control.go",
            "debug_off.go",
            "doc.go",
            "errors.go",
            "events.go",
            "filters.go",
            "frame.go",
            "helpers.go",
            "host_source.go",
            "marshal.go",
            "metadata.go",
            "policies.go",
            "prepared_cache.go",
            "query_executor.go",
            "ring.go",
            "session.go",
            "token.go",
            "topology.go",
            "uuid.go"
        ],
        "IgnoredGoFiles": [
            "batch_test.go",
            "cass1batch_test.go",
            "cassandra_test.go",
            "compressor_test.go",
            "conn_test.go",
            "debug_on.go",
            "errors_test.go",
            "events_ccm_test.go",
            "fuzz.go",
            "marshal_test.go",
            "session_test.go",
            "stress_test.go",
            "topology_test.go",
            "tuple_test.go",
            "udt_test.go",
            "uuid_test.go",
            "wiki_test.go"
        ],
        "Imports": [
            "bufio",
            "bytes",
            "crypto/md5",
            "crypto/rand",
            "crypto/tls",
            "crypto/x509",
            "encoding/binary",
            "encoding/hex",
            "encoding/json",
            "errors",
            "fmt",
            "github.com/gocql/gocql/internal/lru",
            "github.com/gocql/gocql/internal/murmur",
            "github.com/gocql/gocql/internal/streams",
            "github.com/golang/snappy",
            "github.com/hailocab/go-hostpool",
            "golang.org/x/net/context",
            "gopkg.in/inf.v0",
            "io",
            "io/ioutil",
            "log",
            "math",
            "math/big",
            "math/rand",
            "net",
            "reflect",
            "regexp",
            "runtime",
            "sort",
            "strconv",
            "strings",
            "sync",
            "sync/atomic",
            "time",
            "unicode"
        ],
        "Deps": [
            "bufio",
            "bytes",
            "container/list",
            "context",
            "crypto",
            "crypto/aes",
            "crypto/cipher",
            "crypto/des",
            "crypto/dsa",
            "crypto/ecdsa",
            "crypto/elliptic",
            "crypto/hmac",
            "crypto/md5",
            "crypto/rand",
            "crypto/rc4",
            "crypto/rsa",
            "crypto/sha1",
            "crypto/sha256",
            "crypto/sha512",
            "crypto/subtle",
            "crypto/tls",
            "crypto/x509",
            "crypto/x509/pkix",
            "encoding",
            "encoding/asn1",
            "encoding/base64",
            "encoding/binary",
            "encoding/hex",
            "encoding/json",
            "encoding/pem",
            "errors",
            "fmt",
            "github.com/gocql/gocql/internal/lru",
            "github.com/gocql/gocql/internal/murmur",
            "github.com/gocql/gocql/internal/streams",
            "github.com/golang/snappy",
            "github.com/hailocab/go-hostpool",
            "golang.org/x/net/context",
            "gopkg.in/inf.v0",
            "hash",
            "hash/crc32",
            "internal/nettrace",
            "internal/race",
            "internal/singleflight",
            "internal/syscall/unix",
            "io",
            "io/ioutil",
            "log",
            "math",
            "math/big",
            "math/rand",
            "net",
            "os",
            "path/filepath",
            "reflect",
            "regexp",
            "regexp/syntax",
            "runtime",
            "runtime/cgo",
            "runtime/internal/atomic",
            "runtime/internal/sys",
            "sort",
            "strconv",
            "strings",
            "sync",
            "sync/atomic",
            "syscall",
            "time",
            "unicode",
            "unicode/utf16",
            "unicode/utf8",
            "unsafe"
        ],
        "TestGoFiles": [
            "address_translators_test.go",
            "cluster_test.go",
            "common_test.go",
            "control_test.go",
            "events_test.go",
            "filters_test.go",
            "frame_test.go",
            "framer_bench_test.go",
            "host_source_test.go",
            "metadata_test.go",
            "policies_test.go",
            "ring_test.go",
            "session_connect_test.go",
            "token_test.go"
        ],
        "TestImports": [
            "bytes",
            "compress/gzip",
            "flag",
            "fmt",
            "github.com/hailocab/go-hostpool",
            "golang.org/x/net/context",
            "io/ioutil",
            "log",
            "math/big",
            "net",
            "os",
            "sort",
            "strconv",
            "strings",
            "sync",
            "testing",
            "time"
        ]
    }

我做错了什么?如何获得同一文件的2个版本?我如何解决它?

吉姆·琼斯(Jim Jones):

这不是答案,而是解决方案。我没有继续尝试挽救虚拟机,我只是得到了另一个映像,然后从那里开始。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

使用golang dep从同一个github源获得不同的软件包版本

在Golang中安装外部软件包

golang从两个不同的文件位置编译相同的软件包

在同一目录中有两个软件包是否有意义?

Node应用程序中相同npm软件包的两个版本

两个相同的Docker映像如何安装不同的软件包?

nixOS:如何从相同软件包,相同版本的两个实例之间的冲突中恢复

CMake:安装两个Qt版本时查找Qt软件包

同时测试两个不同的npm软件包版本

为什么在安装了Linux内核调试软件包的系统中需要两个内核模块副本?

是否可以将同一Nuget软件包的不同版本安装到代码的不同分支中?

两个安装了相同软件包名称的应用

同一域下的两个网站安装了不同的EF软件包

anaconda软件包如何需要两个通道来安装?

如何在Gentoo中安装同一软件包的多个版本?

安装两个版本的软件

安装两个版本的软件

编译不在同一软件包中的3个文件

运行composer安装时如何解决两个软件包要求冲突?

将deb软件包文件安装在另一个目录中

如何在archlinux中保留同一软件包的两个版本?

某些软件包无法使用多体系结构安装(需要两个)

在具有两个项目的一个解决方案文件中安装不同版本的nuget软件包

一个文件可以由两个RPM软件包拥有吗?

如果有两个软件包,如何从“ apt-cache show”输出中找出软件包的版本?

如何将两个软件包安装程序文件(PKG)合并为一个大的合并安装程序文件?

如何卸载安装了两个版本的软件包?

一口气无法安装两个软件包

如何制作一个执行时将在 Ubuntu 中安装多个软件包的文件?