Documentation ¶
Index ¶
- func ContextWithConfig(ctx context.Context, config *Config) context.Context
- func CreateOrUpdateKeyNode(ctx context.Context, key string, keyNode *yaml.Node) *yaml.Node
- func CreateOrUpdateMapNodeElement(ctx context.Context, key string, keyNode, valueNode, mapNode *yaml.Node) *yaml.Node
- func CreateOrUpdateScalarNode(ctx context.Context, value any, valueNode *yaml.Node) *yaml.Node
- func CreateOrUpdateSliceNode(ctx context.Context, elements []*yaml.Node, valueNode *yaml.Node) *yaml.Node
- func DeleteMapNodeElement(ctx context.Context, key string, mapNode *yaml.Node) *yaml.Node
- func GetMapElementNodes(ctx context.Context, mapNode *yaml.Node, key string) (*yaml.Node, *yaml.Node, bool)
- type Config
- type OutputFormat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithConfig ¶
func CreateOrUpdateKeyNode ¶
func CreateOrUpdateSliceNode ¶
func DeleteMapNodeElement ¶
Types ¶
type Config ¶
type Config struct { KeyStringStyle yaml.Style // The default string style to use when creating new keys ValueStringStyle yaml.Style // The default string style to use when creating new nodes Indentation int // The indentation level of the document OutputFormat OutputFormat // The output format to use when marshalling }
func GetConfigFromContext ¶
func GetConfigFromDoc ¶
type OutputFormat ¶
type OutputFormat string
const ( OutputFormatJSON OutputFormat = "json" OutputFormatYAML OutputFormat = "yaml" )
Click to show internal directories.
Click to hide internal directories.