config

package
v0.0.0-...-d02dc8b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	C = new(Config)
)

Functions

func MustLoad

func MustLoad(path string)

Load config file (toml/json/yaml)

func PrintWithJSON

func PrintWithJSON()

Types

type Command

type Command struct {
	Code string `json:"code"`
	Exec string `json:"exec"`
}

type Config

type Config struct {
	RunMode     string    `json:"runMode"`
	PrintConfig bool      `json:"printConfig"`
	HTTP        HTTP      `json:"http"`
	Commands    []Command `json:"commands"`
}

type HTTP

type HTTP struct {
	Host   string `json:"host"`
	Port   int    `json:"port"`
	Method string `json:"method"`
}

Jump to

Keyboard shortcuts

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