helpers

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: GPL-3.0 Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmd

func Cmd(command string, args ...string) (stdout string, stderr string)

func CsvUTF16ToSlice

func CsvUTF16ToSlice(csv_path string) ([][]string, error)

func ExtractFileNameFromHref

func ExtractFileNameFromHref(href string) string

func FilterStringSlice

func FilterStringSlice(ss []string, test func(string) bool) (ret []string)

Filter a slice of strings. Use an anonymous function as selector, e.g.: func(s string) bool { return strings.HasPrefix(s, "foo_") && len(s) <= 7 }

func FirstWordInFile

func FirstWordInFile(file_path string) (word string, err error)

func GenericParseVersion

func GenericParseVersion(s string) string

func GetCallerFunctionName

func GetCallerFunctionName() string

func Intersection added in v1.0.2

func Intersection(a, b []string) (c []string)

func IsStringInSlice

func IsStringInSlice(a string, list []string) bool

func KeysOfMap

func KeysOfMap(m map[string]string) []string

func MapToString

func MapToString(m map[string]string) string

func PrefixOfAll

func PrefixOfAll(sl []string) (string, error)

func ReadFromURL

func ReadFromURL(url string) ([]byte, error)

func RemoveStringFromSlice

func RemoveStringFromSlice(s []string, r string) []string

func StringToLinesSlice

func StringToLinesSlice(s string) []string

func UniqueNonEmptyElementsOfSlice

func UniqueNonEmptyElementsOfSlice(s []string) []string

func Unzip

func Unzip(src, dest string) error

func YamlToDowncaseFlatMap

func YamlToDowncaseFlatMap(yamldata []byte) (map[string]string, error)

Only downcase the keys, not the values

func YamlToFlatMap

func YamlToFlatMap(yamldata []byte) (map[string]string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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