yq

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package yq provides an updater that uses the yq lib to manipulate YAML (or JSON) files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type YQUpdater

type YQUpdater struct {
	FilePath     string
	Expression   string
	Output       string
	OutputFormat yqlib.PrinterOutputFormat
	Indent       int
	Trim         bool
	UnwrapScalar bool
}

YQUpdater is an updater that uses the yq lib to manipulate YAML (or JSON) files.

func NewUpdater

func NewUpdater(params map[string]string) (*YQUpdater, error)

NewUpdater builds a new YQ updater from the given parameters

func (*YQUpdater) Message

func (u *YQUpdater) Message() (title, body string)

Message returns the default title and body that should be used in the commits / pull requests

func (*YQUpdater) String

func (u *YQUpdater) String() string

String returns a string representation of the updater

func (*YQUpdater) Update

func (u *YQUpdater) Update(_ context.Context, repoPath string) (bool, error)

Update updates the repository cloned at the given path, and returns true if changes have been made

Jump to

Keyboard shortcuts

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