Skip to content

Manage and load configuration files easily in GoLang

Notifications You must be signed in to change notification settings

rosenpin/go-config-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Go Configuration Manager

Installation

go get https://gitlab.com/rosenpin/config-manager

Usage

  1. Create a configuration struct for your project. IE: models.Config
    type Config struct {
        Path
        Port
        Username
        ...
    }
  1. Create the configuration file. IE: config.yaml
Path: /home/user/projectpath
Port: 8080
Username: rosenpin
  1. Load the configuration
configLoader := config.NewLoader("config.yaml")

config := &models.Config{}

err := configLoader.Load(yaml.Unmarshal, config) 
if err != nil {
    panic(err)
}

About

Manage and load configuration files easily in GoLang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages