config

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: MIT Imports: 8 Imported by: 8

README

Config

Simple configure loader

Features

  • support json/yaml
  • default config path from env CONF_FILE_PATH;

Example

package conf

import "github.com/isayme/go-config"

type Config struct {
	Addr string `json:"addr" yaml:"addr"`
}

var cfg Config

func Get() *Config {
	config.Parse(&cfg)

	return &cfg
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(v interface{}, path ...string)

Parse parse config

Types

This section is empty.

Jump to

Keyboard shortcuts

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