utils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheFile

func CacheFile(path, content string, overwrite bool) (string, error)

func CanMakeRequest

func CanMakeRequest() bool

func Contains

func Contains(slice []string, item string) bool

func DownloadFile

func DownloadFile(url, outputPath, token string) error

func EnsureDirExists

func EnsureDirExists(path string) error

func FileExists

func FileExists(path string) bool

func FindMostRecentFile

func FindMostRecentFile(pattern string) (string, error)

func GetFlatListOfColumn

func GetFlatListOfColumn(data [][]string, filters map[string]string, targetCol int) []string

GetFlatListOfColumn returns unique values from a specified column that match all provided filters

func GetListOfUniqueEntries

func GetListOfUniqueEntries(data [][]string, columns []int) [][]string

GetListOfUniqueEntries returns unique combinations of specified columns

func LoadCacheFile

func LoadCacheFile(path string) (string, error)

func ParseUrl

func ParseUrl(urlStr string) *url.URL

func RenameFileOccurances

func RenameFileOccurances(filename, oldScope, newScope string, occurances int) error

func ResetRequestCounters

func ResetRequestCounters()

func UploadFile

func UploadFile(url, inputPath, token string) (*http.Response, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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