Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Expose the string value for flags #201

@gouthamve

Description

@gouthamve

Hi, I want to iterate through the flags and then get the registered names and values (as string). But f.Value.String() gives the pointer value and not the string.

Ref: prometheus/prometheus#2993
Relevant code for above: https://github.com/prometheus/prometheus/blob/dev-2.0/cmd/prometheus/main.go#L261-L264

Is there an API through which I can get the string?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions