utils

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: EUPL-1.2 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanPath

func CleanPath(path string) string

HarmonizePathStar returns "path/" => "path/*" or "path///" => "path/*" or "pathxxxyyy" => "pathxxxyyy"

func CleanPathStar

func CleanPathStar(path string) string

CleanPathStar returns "path/" => "path/*" or "path///" => "path/*" or "pathxxxyyy" => "pathxxxyyy"

func Dir3Dot

func Dir3Dot(path string) string

func DirStar

func DirStar(path string) string

func DirTrailSep

func DirTrailSep(path string) string

func IsDirRecursive

func IsDirRecursive(path string) bool

func JustDir

func JustDir(path string) string

func OptimizePathsGlob added in v0.8.0

func OptimizePathsGlob(paths *[]string) []string

TODO: queries could be significantly optimised if we would smartly filter a path list to: - exlude all entries if an item "/my/dir/.../myfile" with a parent dir "/my/dir*/*"" or "/my/dir/*" exists This is a variation of "FilterCommonRootdirs" with glob support For now, our simpler implementation just filters duplicates OptimizePathsGlob returns an optimised paths list with duplicates removed (TODO: remove children that are included by parent glob)

func StringSliceApply

func StringSliceApply(slice []string, fun func(string) string) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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