fritzbox_exporter icon indicating copy to clipboard operation
fritzbox_exporter copied to clipboard

Incompatible with latest go versions

Open hadmut opened this issue 4 years ago • 1 comments

Hi,

go get github.com/ndecker/fritzbox_exporter

works under

  • ubuntu 20.04 with ubuntu-packaged go 1.13.8
  • alpine 3.13 with go 1.15.12

but not with

  • alpine 3.14 with go 1.16.5
  • ubuntu 20.04 with snap package go 1.16.6

Error message in both cases:

go/pkg/mod/github.com/ndecker/[email protected]/main.go:326:26: undefined: prometheus.Handler

hadmut avatar Jul 14 '21 19:07 hadmut

Solution:

add "github.com/prometheus/client_golang/prometheus/promhttp" to imports and replace prometheus.Handler with promhttp.Handler

hadmut avatar Nov 06 '21 23:11 hadmut

Hello @hadmut , i have updated the dependencies. It builds with current go and prometheus client.

ndecker avatar Dec 10 '22 22:12 ndecker