helpers

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2019 License: GPL-3.0 Imports: 12 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "Unknown Version"

Functions

func BaseConfigPath

func BaseConfigPath() string

BaseConfigPath returns the root for our config folders.

func CacheDir

func CacheDir() string

CacheDir returns a cache folder to use.

func EnsurePath

func EnsurePath(pathName string) error

EnsurePath ensures the given filesystem path exists, if not it will create it.

func FileExists

func FileExists(pathName string) bool

FileExists checks whether a file or folder exists in the filesystem, will follow symlinks and ensures the target exists too.

func GetHome

func GetHome() string

GetHome returns the given users home folder

func InitLoggers

func InitLoggers(level log.Level)

InitLoggers sets the default logger options

func LogPath

func LogPath() string

LogPath returns the path to our logfolder.

func MetadataConfigPath

func MetadataConfigPath() string

MetadataConfigPath returns the config path for the md server

func RandAlphaString

func RandAlphaString(n int) string

func UserCacheDir

func UserCacheDir() (string, error)

UserCacheDir returns the default root directory to use for user-specific cached data. Users should create their own application-specific subdirectory within this one and use that.

On Unix systems, it returns $XDG_CACHE_HOME as specified by https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html if non-empty, else $HOME/.cache. On Darwin, it returns $HOME/Library/Caches. On Windows, it returns %LocalAppData%. On Plan 9, it returns $home/lib/cache.

If the location cannot be determined (for example, $HOME is not defined), then it will return an error.

Types

This section is empty.

Directories

Path Synopsis
Package levenshtein is a Go implementation to calculate Levenshtein Distance.
Package levenshtein is a Go implementation to calculate Levenshtein Distance.

Jump to

Keyboard shortcuts

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