convert

package
v0.13.0 Latest Latest
Warning

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

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

Documentation

Overview

Package convert handles helm conversion.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractIntFromBrackets

func ExtractIntFromBrackets(s string) (int, error)

ExtractIntFromBrackets extracts an integer from bracketed strings.

func Inspect

func Inspect(node parse.Node, f func(parse.Node) bool)

Inspect traverses a template parse tree in depth-first order: It starts by calling f(node); node must not be nil. If f returns true, Inspect invokes f for all the non-nil children of node, recursively.

func NewCmd

func NewCmd() *cobra.Command

NewCmd creates a new convert command.

func Unflatten

func Unflatten(inputMap map[*[]string]interface{}) (map[string]interface{}, error)

Unflatten This function will unflatten a JSON

func Walk

func Walk(v Visitor, node parse.Node)

Walk traverses a template parse tree in depth-first order: It starts by calling v.Visit(node); node must not be nil. If the visitor w returned by v.Visit(node) is not nil, Walk is invoked recursively with visitor w for each of the non-nil children of node, followed by a call of w.Visit(nil).

Types

type ExpectedValuesFinder

type ExpectedValuesFinder struct {
	// contains filtered or unexported fields
}

ExpectedValuesFinder finds expected values in templates.

func (*ExpectedValuesFinder) Visit

func (v *ExpectedValuesFinder) Visit() func(parse.Node) bool

Visit visits parse nodes to find expected values.

type Lookup added in v0.9.0

type Lookup struct {
	Text  string
	Array bool
	Key   string
	Start int
	End   int
}

Lookup is used for template matching.

type Options

type Options struct {
	// contains filtered or unexported fields
}

Options holds the options for the command.

type Visitor

type Visitor interface {
	Visit(node parse.Node) (w Visitor)
}

Visitor Visit method is invoked for each node encountered by Walk. If the result visitor w is not nil, Walk visits each of the children of node with the visitor w, followed by a call of w.Visit(nil).

Jump to

Keyboard shortcuts

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