util

package
v0.0.0-...-ed2a021 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: AGPL-3.0 Imports: 8 Imported by: 1

Documentation

Overview

Package util provides helper functions for common components configuration.

This package is a work in progress and makes no API stability promises.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindViper

func BindViper(v *viper.Viper, pflagKey string)

BindViper binds pflagKey to viper

func DirExists

func DirExists(dirname string) bool

DirExists returns true if dirname exists

func FileExists

func FileExists(filename string) bool

FileExists returns true if filename exists

func GetFilesDB

func GetFilesDB(extension string, listFiles []string, listDirs []string) ([]string, error)

GetFilesDB returns files with extension the extension passed from the lists

func IsValid

func IsValid(value string, valid []string) bool

IsValid returns true if value is into the valid set

func Listener

func Listener(uri string) (net.Listener, error)

Listener returns a listener socket from an uri

func ParseListenURI

func ParseListenURI(s string) (proto string, addr string, err error)

ParseListenURI returns proto, addrs and error if URI is not valid

Types

This section is empty.

Jump to

Keyboard shortcuts

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