kubeyaml

package
v0.0.0-...-4afb93c Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Join

func Join(parts ...[]byte) []byte

Join the given yaml parts into a single multipart document.

func JoinString

func JoinString(parts ...string) string

JoinString joins the given yaml parts into a single multipart document.

Types

type LineReader

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

func (*LineReader) Read

func (r *LineReader) Read() ([]byte, error)

Read returns a single line (with '\n' ended) from the underlying reader. An error is returned iff there is an error with the underlying reader.

type Reader

type Reader interface {
	Read() ([]byte, error)
}

type YAMLReader

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

YAMLReader adapts from Kubernetes YAMLReader(apimachinery.k8s.io/pkg/util/yaml/decoder.go). It records the start line number of the chunk it reads each time.

func NewYAMLReader

func NewYAMLReader(r *bufio.Reader) *YAMLReader

func (*YAMLReader) Read

func (r *YAMLReader) Read() ([]byte, int, error)

Read returns a full YAML document and its first line number.

Jump to

Keyboard shortcuts

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