config

package
Version: v0.0.0-...-ed5f423 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalConfig = &Config{
	Server: Server{
		Host: "0.0.0.0",
		Port: 9091,
	},
	File: File{
		BufferSize: 8 * 1024,
	},
}

Functions

func Embed

func Embed(path string, data string) error

Types

type Config

type Config struct {
	Server Server `json:"client" toml:"client"`
	File   File   `json:"file" toml:"file"`
}

func (*Config) Load

func (c *Config) Load(path string, override func(cfg *Config)) error

func (*Config) String

func (cg *Config) String() string

type File

type File struct {
	BufferSize int64 `json:"buffer-size" toml:"buffer-size"`
}

type Server

type Server struct {
	Host string `json:"host" toml:"host"`
	Port int    `json:"port" toml:"port"`
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL