helmutils

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindHelmChartWhiteSpaces

func FindHelmChartWhiteSpaces(data string, opts HelmDetectOptions) [][]string

returns the windows of the helm chart that contain white spacing and formatting issues.

func Window

func Window(s []string, index int, windowSize int) []string

Types

type HelmDetectOptions

type HelmDetectOptions struct {
	// DetectWhiteSpacesInEmptyLines is used to detect white spaces in empty lines
	DetectWhiteSpacesInEmptyLines bool
}

HelmDetectOptions is used to configure the FindHelmChartWhiteSpaces function

type Spaces

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

Spaces is a struct that contains information about a line and the spaces after the line has been split on a space.

func NewSpaces

func NewSpaces(s string) *Spaces

NewSpaces will return a new Spaces struct

func (*Spaces) BeginsWithArray

func (s *Spaces) BeginsWithArray() bool

BeginsWithArray returns if the line starts as an YAML array

func (*Spaces) ContainsOnlySpaces

func (s *Spaces) ContainsOnlySpaces() bool

ContainsOnlySpaces returns true if the line only contains spaces

func (*Spaces) GetNumberOfSpacesAtBeginning

func (s *Spaces) GetNumberOfSpacesAtBeginning() int

GetNumberOfSpacesAtBeginning returns the number of spaces (' ') at the beginning of the line

func (*Spaces) HasSpecialBreak

func (s *Spaces) HasSpecialBreak() bool

HasSpecialBreak if the last section contians a special break

func (*Spaces) IsEmptyLine

func (s *Spaces) IsEmptyLine() bool

IsEmptyLine returns true if the line is empty

func (*Spaces) IsNewResource

func (s *Spaces) IsNewResource() bool

IsNewResource returns if the line starts a new resource

func (*Spaces) StartsWithComment

func (s *Spaces) StartsWithComment() bool

StartsWithComment returns if the line starts with a comment

Jump to

Keyboard shortcuts

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