merge2

package
v0.10.9 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 5 Imported by: 20

Documentation

Overview

Package merge contains libraries for merging fields from one RNode to another RNode

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Merge

func Merge(src, dest *yaml.RNode, mergeOptions yaml.MergeOptions) (*yaml.RNode, error)

Merge merges fields from src into dest.

func MergeStrings

func MergeStrings(srcStr, destStr string, infer bool, mergeOptions yaml.MergeOptions) (string, error)

Merge parses the arguments, and merges fields from srcStr into destStr.

Types

type Merger

type Merger struct {
}

func (Merger) SetComments

func (m Merger) SetComments(sources walk.Sources) error

SetComments copies the dest comments to the source comments if they are present on the source.

func (Merger) SetStyle added in v0.0.3

func (m Merger) SetStyle(sources walk.Sources) error

func (Merger) VisitList

func (m Merger) VisitList(nodes walk.Sources, s *openapi.ResourceSchema, kind walk.ListKind) (*yaml.RNode, error)

func (Merger) VisitMap

func (m Merger) VisitMap(nodes walk.Sources, s *openapi.ResourceSchema) (*yaml.RNode, error)

func (Merger) VisitScalar

func (m Merger) VisitScalar(nodes walk.Sources, s *openapi.ResourceSchema) (*yaml.RNode, error)

Jump to

Keyboard shortcuts

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