config

package
v0.0.0-...-9430c4f Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package config provides utility functions to access the toml objects defined in config.toml. Example of a config file is located at: https://github.com/amadeovezz/gobro/tree/master/config. It is important to note that when defining what fields to parse in config.toml, the same fields must be included in schema.sql. However, all fields with ".", must be replaced in the with "_" in schema.sql.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Title  string
	Parser map[string]parser
	DB     database `toml:"database"`
}

Config represents config options for fields to parse and db options

func (*Config) SetupConfig

func (c *Config) SetupConfig(path string)

SetupConfig parses a toml file and log.Fatal's if it cannot parse it correctly

Jump to

Keyboard shortcuts

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