config

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigFromFile

func ConfigFromFile(path string, cfg Config) error

func ParseJSON

func ParseJSON(r io.Reader, cfg Config) error

func ParseYAML

func ParseYAML(r io.Reader, cfg Config) error

Types

type Config

type Config interface{}

type ServerConfig

type ServerConfig struct {
	Host         string        `yaml:host`
	Port         string        `yaml:port`
	ReadTimeout  time.Duration `yaml:readtimeout`
	WriteTimeout time.Duration `yaml:writetimeout`
}

func ServerConfigFromYaml

func ServerConfigFromYaml(filepath string) (cfg ServerConfig, err error)

Jump to

Keyboard shortcuts

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