cmd

package
v3.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const ProductName = "yq"

ProductName is the name of the product

Variables

View Source
var (
	TestYmlStr = `` /* 1039-byte string literal not displayed */

	TestYmlStr2 = `
name: Fred
age: 22
---
name: Stella
age: 23
---
name: Android
age: 232
`

	TestYmlStr3 = `` /* 225-byte string literal not displayed */

)
View Source
var (
	GitCommit   string
	GitDescribe string

	// Version is main version number that is being run at the moment.
	Version = "3.2.2"

	// VersionPrerelease is a pre-release marker for the version. If this is "" (empty string)
	// then it means that it is a final release. Otherwise, this is a pre-release
	// such as "dev" (in development), "beta", "rc1", etc.
	VersionPrerelease = ""
)

The git commit that was compiled. This will be filled in by the compiler.

Functions

func CreateUpReadCmd

func CreateUpReadCmd() *cobra.Command

func GetVersionDisplay

func GetVersionDisplay() string

GetVersionDisplay composes the parts of the version in a way that's suitable for displaying to humans.

func New

func New() *cobra.Command

func SetLogLevel

func SetLogLevel(level string)

func UpCmd

func UpCmd() *cobra.Command

func UpDeletePathFromFile added in v3.2.8

func UpDeletePathFromFile(filepath, elepath string, inplace bool, logLevel string) (string, error)

func UpReadYmlFile

func UpReadYmlFile(filepath, epath, logLevel string, toArray bool) (string, error)

func UpReadYmlStr

func UpReadYmlStr(ymlstr, epath, logLevel string, toArray bool) (string, error)

func UpValidateYmlFile

func UpValidateYmlFile(filename string, logLevel string) error

func UpValidateYmlStr

func UpValidateYmlStr(ymlstr string, logLevel string) error

func UpWriteNodeFromFile added in v3.3.1

func UpWriteNodeFromFile(filepath, elepath, value string, inplace bool, logLevel string) (string, error)

func UpWriteNodeFromStrForComplexValueFromYmlFile added in v3.3.1

func UpWriteNodeFromStrForComplexValueFromYmlFile(ymlstr, elepath, complexymlvaluefilepath string, logLevel string) (string, error)

func UpWriteNodeFromStrForComplexValueFromYmlStr added in v3.3.1

func UpWriteNodeFromStrForComplexValueFromYmlStr(ymlstr, elepath, complexymlvalue string, logLevel string) (string, error)

func UpWriteNodeFromStrForSimpleValue added in v3.3.1

func UpWriteNodeFromStrForSimpleValue(ymlstr, elepath, value string, logLevel string) (string, error)

Types

type YmlResultWriter added in v3.2.8

type YmlResultWriter struct {
	Buf    *[]byte
	Result string
}

func (*YmlResultWriter) Write added in v3.2.8

func (yml *YmlResultWriter) Write(data []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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