Documentation
¶
Index ¶
- Constants
- Variables
- func All[T any](s []T, test func(T) bool) bool
- func Any[T any](s []T, test func(T) bool) bool
- func AssertPanic(t *testing.T, f func())
- func Bool(v bool) *bool
- func Contains(s []string, v string) bool
- func ExecuteCommand(root *cobra.Command, args ...string) (c *cobra.Command, output string, err error)
- func ExecuteCommandErr(root *cobra.Command, args ...string) (c *cobra.Command, output string, errOutput string, err error)
- func Filter[T any](s []T, test func(T) bool) []T
- func FormatMap(m map[string]string, separator string, alignRight bool) string
- func GetCaptures(re *regexp.Regexp, findAll bool, capture string, s string) ([]string, error)
- func GetURLsFromArgs(args []string) ([]string, hcl.Diagnostics)
- func HasNamedCaptures(re *regexp.Regexp) (bool, []string)
- func Int(v int) *int
- func ParseURLList(contents, filename string) ([]string, hcl.Diagnostics)
- func Plural(count int, singular string, plural string) string
- func PrintDiag(w io.Writer, diag *hcl.Diagnostic)
- func String(v string) *string
- func Unique(s []string) []string
- func ZipMap(keys []string, values []string) map[string]string
Constants ¶
View Source
const ( DiagInvalid hcl.DiagnosticSeverity = iota DiagError DiagWarning DiagInfo DiagDebug )
Variables ¶
View Source
var ErrSilent = errors.New("ErrSilent")
View Source
var ( // Root folder of this project ProjectRoot = filepath.Join(filepath.Dir(b), "../..") )
Functions ¶
func AssertPanic ¶
func ExecuteCommand ¶
func ExecuteCommandErr ¶
func GetCaptures ¶
"findAll" gives back multiple matches. if set to false, only the first match is captured capture is either the group index as a string or the group name
func GetURLsFromArgs ¶
func GetURLsFromArgs(args []string) ([]string, hcl.Diagnostics)
func ParseURLList ¶
func ParseURLList(contents, filename string) ([]string, hcl.Diagnostics)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.