statement

package
v0.0.122 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteJenkinsfileStatements

func WriteJenkinsfileStatements(indentCount int, statements []*Statement) string

WriteJenkinsfileStatements writes the given Jenkinsfile statements as a string

Types

type Statement

type Statement struct {
	Function  string
	Arguments []string
	Statement string
	Children  []*Statement
}

Statement represents a statement in a Jenkinsfile

func (*Statement) ContextEquals

func (s *Statement) ContextEquals(that *Statement) bool

ContextEquals returns true if this statement is a context statement and it equals the same context as that statement

func (*Statement) Text

func (s *Statement) Text() string

Text returns the text line of the current function or statement

type Writer

type Writer struct {
	InitialIndent string
	IndentText    string
	Buffer        bytes.Buffer
	IndentCount   int
}

Writer implements the struct for Jenkinsfilewriter

func NewWriter

func NewWriter(indentCount int) *Writer

NewWriter creates a Jenkinsfile writer

func (*Writer) String

func (w *Writer) String() string

String returns the string value of this writer

func (*Writer) Write

func (w *Writer) Write(inputStatements []*Statement)

Jump to

Keyboard shortcuts

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