kv

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Import

type Import struct {
	ImportPath, Import string
	DefaultImport      bool
}

type List

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

func NewList

func NewList(o ...Object) List

func (*List) Append

func (l *List) Append(o ...Object)

func (*List) GetImports

func (l *List) GetImports() []*Import

func (*List) Len

func (l *List) Len() int

func (*List) String

func (l *List) String() string

type ListItem

type ListItem struct {
	Items []string
}

func NewListItemWithQuotedItems

func NewListItemWithQuotedItems(l []string) *ListItem

func (*ListItem) String

func (li *ListItem) String() string

type Object

type Object struct {

	// if no children and true, doesn't render the {}
	OptionalCurly bool
	// contains filtered or unexported fields
}

func NewObjectFromPairs

func NewObjectFromPairs(p ...Pair) Object

func (*Object) Append

func (o *Object) Append(p ...Pair)

func (*Object) AppendList

func (o *Object) AppendList(key string, l List)

func (*Object) AppendObject

func (o *Object) AppendObject(key string, o2 Object)

func (*Object) GetImports

func (o *Object) GetImports() []*Import

func (*Object) String

func (o *Object) String() string

type Pair

type Pair struct {
	Key    string
	Value  string
	Import *Import
}

Jump to

Keyboard shortcuts

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