Skip to content

🪚 Mini tool to handle configurations saved on a yaml file an a easy way

Notifications You must be signed in to change notification settings

pablotrianda/config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Config 🪚

made-with-Go Maintenance Open Source Love png1

This package allow to read configurations an a easy and fast way from a yaml file

This mini tool have the follow actions:

  • Read a config file

Installation

To install config package, you need to install Go and set your Go workspace first.

1.The first need Go installed(version 1.14+ is required), then you can use the below Go command to install config.

go get -u github.com/pablotrianda/config

2.Import it in your code:

import "github.com/pablotrianda/config"

Usage example

Having a yaml file with this data:

some: thing
here: goes
import "github.com/pablotrianda/config"

func main(){
  // Load the configuration file
  cfg := config.Load("to/yaml/file/conf.yaml")
  // Get values
  cfg.Get("some")
}

Contact

You can reach me on Twitter @pablotrianda

About

🪚 Mini tool to handle configurations saved on a yaml file an a easy way

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages