listformat

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatDescriptionList

func FormatDescriptionList(def string, elems ...string) string

func FormatList

func FormatList(def string, elems ...string) string

func FormatListElements

func FormatListElements(def string, elems ListElements) string

func FormatMapElements

func FormatMapElements[K ~string, E any](def string, m map[K]E, desc ...func(E) string) string

func StringDescription

func StringDescription[E any](e E) string

Types

type DescriptionSource

type DescriptionSource interface {
	GetDescription() string
}

type DirectDescriptionSource

type DirectDescriptionSource interface {
	Description() string
}

type ListElements

type ListElements interface {
	Len() int
	Key(i int) string
	Description(i int) string
}

type StringElementDescriptionList

type StringElementDescriptionList []string

func (StringElementDescriptionList) Description

func (l StringElementDescriptionList) Description(i int) string

func (StringElementDescriptionList) Key

func (StringElementDescriptionList) Len added in v0.16.0

type StringElementList

type StringElementList []string

func (StringElementList) Description

func (l StringElementList) Description(i int) string

func (StringElementList) Key

func (l StringElementList) Key(i int) string

func (StringElementList) Len added in v0.16.0

func (l StringElementList) Len() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL