config

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package config gets configuration data from .env file or env variables.

Index

Constants

This section is empty.

Variables

View Source
var ErrIncorrectDelimiter = errors.New("incorrect delimiter. there must be only one rune in string")

ErrIncorrectDelimiter is error for incorrect delimiter.

Functions

This section is empty.

Types

type Config

type Config struct {
	Timeout        time.Duration `default:"500ms"`
	Workers        int           `default:"50"`
	TableLocation  string        `default:"./"`
	Limit          int32         `default:"100"`
	Delimiter      string        `default:","`
	FieldDelimiter rune
}

Config describes configuration data.

func GetConfig

func GetConfig() (*Config, error)

GetConfig returns configuration data from .env file or env variables.

Jump to

Keyboard shortcuts

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