Skip to content

Installing examples is not working anymore #1119

@itsmylife

Description

@itsmylife

I am trying to install the examples with the command below:

$ go install github.com/prometheus/client_golang/examples/random@latest

but I am getting the following error:

go: github.com/prometheus/client_golang/examples/random@latest (in github.com/prometheus/[email protected]):
	The go.mod file for the module providing named packages contains one or
	more exclude directives. It must not contain directives that would cause
	it to be interpreted differently than if it were the main module.

This was working with the previous version:

go install github.com/prometheus/client_golang/examples/[email protected]

I assume the changes introduced here #1062 are the reason. Especially this line:
https://github.com/prometheus/client_golang/blob/main/go.mod#L31

My Go Version:

go version go1.18.1 darwin/arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions