config

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	APP struct {
		Name    string `default:"app"`
		Version string `default:"1.0.0"`
		Addr    string `default:"8081"`
		Timeout int    `default:"5"`
	}
	Data struct {
		Database struct {
			Driver string `default:"mysql"`
			Source string
		}
		Redis struct {
			Addr         string
			Password     string
			ReadTimeout  float64 `default:"0.2"`
			WriteTimeout float64 `default:"0.2"`
		}
	}
}

func New

func New(path string) (*Config, error)

Jump to

Keyboard shortcuts

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