Golang 修改导入模块的名称失败

我正在尝试让SkyDNSv1恢复生机并从我的 fork 构建它(这里是Dockerfile)。SkyDNS 是一款非常优秀且简单的快速服务发现工具,但它已经很长时间没有更新了。


构建过程中出现错误,这是由第三方库引起的。我无法弄清楚为什么会这样:


$ docker build --no-cache -t skydns1 .

Sending build context to Docker daemon 1.566 MB

Sending build context to Docker daemon 

Step 0 : FROM golang:1.4.2

 ---> 3e8cb8e0c765

Step 1 : WORKDIR /go/src

 ---> Running in 3a06cf460ad9

 ---> 1dd14a099164

Removing intermediate container 3a06cf460ad9

Step 2 : RUN go get github.com/codegangsta/cli

 ---> Running in eabcfd6fe621

 ---> c9ea222f2d74

Removing intermediate container eabcfd6fe621

Step 3 : RUN go get github.com/vitalyisaev2/skydns1

 ---> Running in 3264582b2e7a

# github.com/rcrowley/go-metrics/influxdb

github.com/rcrowley/go-metrics/influxdb/influxdb.go:19: undefined: client.ClientConfig

github.com/rcrowley/go-metrics/influxdb/influxdb.go:38: undefined: client.Series

github.com/rcrowley/go-metrics/influxdb/influxdb.go:44: undefined: client.Series

github.com/rcrowley/go-metrics/influxdb/influxdb.go:52: undefined: client.Series

github.com/rcrowley/go-metrics/influxdb/influxdb.go:60: undefined: client.Series

github.com/rcrowley/go-metrics/influxdb/influxdb.go:70: undefined: client.Series

github.com/rcrowley/go-metrics/influxdb/influxdb.go:82: undefined: client.Series

github.com/rcrowley/go-metrics/influxdb/influxdb.go:93: undefined: client.Series

github.com/rcrowley/go-metrics/influxdb/influxdb.go:106: client.WriteSeries undefined (type *client.Client has no field or method WriteSeries)

INFO[0075] The command [/bin/sh -c go get github.com/vitalyisaev2/skydns1] returned a non-zero code: 

但是,如果您查看导致此错误的文件,您会注意到 Golang 对influxdb/client. 我认为,编译器不会替代进口的名字client与influxClient它应该做的:


package influxdb


import (

    "fmt"

    influxClient "github.com/influxdb/influxdb/client"

    "github.com/rcrowley/go-metrics"

    "log"

    "time"

可能我只是错过了一个明显的错误。任何帮助将不胜感激。


qq_遁去的一_1
浏览 195回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Go