gesellix / couchdb-prometheus-exporter

CouchDB stats exporter for Prometheus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to build couchdb exporter

vkuznet opened this issue · comments

Hi,
I'm unable to build couchdb exporter, here is the actual error I see:

go get github.com/gesellix/couchdb-prometheus-exporter
# github.com/gesellix/couchdb-prometheus-exporter/fileutil
gopath/src/github.com/gesellix/couchdb-prometheus-exporter/fileutil/properties_file_loader.go:69:25: cannot use &MapInputSource literal (type *MapInputSource) as type altsrc.InputSourceContext in return argument:
        *MapInputSource does not implement altsrc.InputSourceContext (missing Source method)

and I'm using SL7 with

go version go1.13.6 linux/amd64

Could you please provide advice how to fix that.

Thanks,
Valentin.

Hi Valentin,

I can confirm your issue when using go get or go install. It does work, though, when cloning this repo and running go build. I'll need to read the Golang docs to understand why both commands behave differently. :)

Please try to enable Go 1.11 modules explicitly before installing the module:

export GO111MODULE=on
go get github.com/gesellix/couchdb-prometheus-exporter

yes, I confirm that explicit export of Go 1.11 modules fix the issue. I hope you can update the documentation about that, and I will leave it up to you either to close or keep open this issue.