Help us shape the future of Go! Take the 2026 Go Developer Survey

attribute

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyValue

type KeyValue struct {
	Key   Value
	Value Value
}

func Attribute

func Attribute(key string, value Value) KeyValue

func ID

func ID[T any](v T) KeyValue

func Optional

func Optional[T any](key string, value *T) KeyValue

Optional renders the provided pointer. Missing values are displayed as "-".

func OptionalString

func OptionalString(key string, value *string) KeyValue

OptionalString renders string pointers, treating nil or empty values as "-".

type Value

type Value struct {
	Text  string
	Style lipgloss.Style
}

func OptionalStringValue

func OptionalStringValue(value *string) Value

func OptionalValue

func OptionalValue[T any](value *T) Value

func Styled

func Styled[T any](v T, style ...lipgloss.Style) Value

func ValueOf

func ValueOf[T any](v T, style ...lipgloss.Style) Value

func (Value) String

func (v Value) String() string

Jump to

Keyboard shortcuts

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