util

package
v3.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BreakingChangeAllowed

func BreakingChangeAllowed(left string, right string) (bool, error)

func CompareVersions

func CompareVersions(left string, right string) (int, error)

func FileExists

func FileExists(file string) bool

func Flatten

func Flatten(items []interface{}) ([]string, error)

func GetRandomPort

func GetRandomPort() (int, error)

func PrintDelimiterLineToWriter added in v3.1.1

func PrintDelimiterLineToWriter(w io.Writer, delimiterChar string)

func RandomString

func RandomString(length int) string

RandomString string creates a random string of numbers and lower-case ascii characters with the specified length.

func SanitizeName

func SanitizeName(s string, maxLength int) string

func StringSliceContains

func StringSliceContains(slice []string, s string) bool

Types

type ChartYaml

type ChartYaml struct {
	Name        string `yaml:"name"`
	Version     string `yaml:"version"`
	Deprecated  bool   `yaml:"deprecated"`
	Maintainers []Maintainer
}

func ReadChartYaml

func ReadChartYaml(dir string) (*ChartYaml, error)

ReadChartYaml attempts to parse Chart.yaml within the specified directory and return a newly allocated ChartYaml object. If no Chart.yaml is present or there is an error unmarshaling the file contents, an error will be returned.

func UnmarshalChartYaml

func UnmarshalChartYaml(yamlBytes []byte) (*ChartYaml, error)

UnmarshalChartYaml parses the yaml encoded data and returns a newly allocated ChartYaml object.

type DirectoryLister

type DirectoryLister struct{}

func (DirectoryLister) ListChildDirs

func (l DirectoryLister) ListChildDirs(parentDir string, test func(dir string) bool) ([]string, error)

ListChildDirs lists subdirectories of parentDir matching the test function.

type Maintainer

type Maintainer struct {
	Name  string `yaml:"name"`
	Email string `yaml:"email"`
}

type Utils added in v3.7.1

type Utils struct{}

func (Utils) LookupChartDir added in v3.7.1

func (u Utils) LookupChartDir(chartDirs []string, dir string) (string, error)

Jump to

Keyboard shortcuts

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