cfg

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package cfg contains configuration helpers for RUN-DSP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPersistentFlag

func AddPersistentFlag(cmd *cobra.Command, configKey, flag, usage string, def any)

AddPersistentFlag adds a persistent flag `flag“, with default `def“ and usage message `usage`, and it will also bind the flag to the viper `configKey`.

func CheckConnectAddr

func CheckConnectAddr(address string) error

CheckConnectAddr checks if it's possible to connect to a TCP address, and will return an error if anything is wrong.

func CheckFilesExist

func CheckFilesExist(files ...string) error

CheckFilesExist checks if the given files exist, and are not directories.

func CheckListenPort

func CheckListenPort(address string, port int) error

CheckListenPort checks if it's possible to listen on an address/port combination, and will return an error if anything is wrong.

Types

This section is empty.

Jump to

Keyboard shortcuts

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