Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

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

Releases

No releases published

Packages

No packages published

Languages