util

package
v0.0.0-...-dfd8685 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsAllStrings

func ContainsAllStrings(haystack []string, needles []string) bool

ContainsAllStrings checks if a haystack contains all needles

func ContainsAnyString

func ContainsAnyString(haystack []string, needles []string) bool

ContainsAnyString checks if a haystack contains any needle

func FilterByDirectory

func FilterByDirectory(files []string, inDir string) []string

FilterByDirectory removes all files from a slice that are not in a given directory

func FilterByType

func FilterByType(files []string, ofType string) []string

FilterByType removes all files from a list that do not have the suffix ofType The ofType argument should include the dot ".txt", ".go" ...

func RelativePathFromTo

func RelativePathFromTo(from string, to string) string

RelativePathFromTo returns the relative path from directory `from` to the file `to`

Types

This section is empty.

Jump to

Keyboard shortcuts

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