Documentation ¶
Index ¶
- Constants
- func Do(configPath string, save bool, upgrader BaseUpgrader, additional ...Upgrader) ([]byte, bool, error)
- type BaseUpgrader
- type Helper
- func (helper *Helper) AddSpaceBeforeComment(path ...string)
- func (helper *Helper) Copy(allowedTypes YAMLType, path ...string)
- func (helper *Helper) Get(tag YAMLType, path ...string) (string, bool)
- func (helper *Helper) GetBase(path ...string) string
- func (helper *Helper) GetBaseNode(path ...string) *YAMLNode
- func (helper *Helper) GetNode(path ...string) *YAMLNode
- func (helper *Helper) Set(tag YAMLType, value string, path ...string)
- func (helper *Helper) SetMap(value YAMLMap, path ...string)
- type SimpleUpgrader
- type SpacedUpgrader
- type StructUpgrader
- type Upgrader
- type YAMLList
- type YAMLMap
- type YAMLNode
- type YAMLType
Constants ¶
View Source
const ( NullTag = "!!null" BoolTag = "!!bool" StrTag = "!!str" IntTag = "!!int" FloatTag = "!!float" TimestampTag = "!!timestamp" SeqTag = "!!seq" MapTag = "!!map" BinaryTag = "!!binary" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseUpgrader ¶
type SimpleUpgrader ¶
type SimpleUpgrader func(helper *Helper)
func (SimpleUpgrader) DoUpgrade ¶
func (su SimpleUpgrader) DoUpgrade(helper *Helper)
type SpacedUpgrader ¶
type StructUpgrader ¶
type StructUpgrader struct { SimpleUpgrader Blocks [][]string Base string }
func (*StructUpgrader) GetBase ¶
func (su *StructUpgrader) GetBase() string
func (*StructUpgrader) SpacedBlocks ¶
func (su *StructUpgrader) SpacedBlocks() [][]string
type YAMLNode ¶
func StringNode ¶
func (*YAMLNode) UpdateContent ¶
func (yn *YAMLNode) UpdateContent()
Click to show internal directories.
Click to hide internal directories.