pathifier

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	YAML = internal.YAML
	JSON = internal.JSON
)

Variables

View Source
var WithOutputFormat = internal.WithOutputFormat

Functions

func WithAttributeNameFormat

func WithAttributeNameFormat(attrNameFmt string) func(builder *builder)

func WithStrictMode

func WithStrictMode(strict bool) func(builder *builder)

Types

type Pathifier

type Pathifier[S Type] interface {
	Set(pathValueList ...any) Pathifier[S]
	SetWithPrefix(prefix string, pathValueList ...any) Pathifier[S]
	SetWithDynamicPrefix(fn func(string) string, pathValueList ...any) Pathifier[S]
	Out() S
	YAML() string
	JSON() string
	String(opts ...internal.OutputOpt) string
}

func Load

func Load[T Type](content T, options ...PathifyOpt) Pathifier[T]

func New

func New(options ...PathifyOpt) Pathifier[map[string]any]

type PathifyOpt

type PathifyOpt func(sanitizer *builder)

type Type

type Type interface {
	map[string]any | []any
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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