counter

package standard library
go1.26.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountFlagValue

func CountFlagValue(prefix string, flagSet flag.FlagSet, flagName string)

CountFlagValue creates a counter for the flag value if it is set and increments the counter. The name of the counter is the concatenation of prefix, the flagName, ":", and value.String() for the flag's value.

func CountFlags

func CountFlags(prefix string, flagSet flag.FlagSet)

CountFlags creates a counter for every flag that is set and increments the counter. The name of the counter is the concatenation of prefix and the flag name.

func