Config-loader - Minimal and safe way to load in configuration files without any extra boilerplate, made for my own personal usage

💕 config-loader

Minimal and safe way to load in configuration files without any extra boilerplate, made for my own personal usage!

Why did you build this?

Because, I didn't want to repeat and copy/paste code into the Go projects I am creating, so I made it into a tiny package that everyone can use, but you don't have to!

Usage

$ go get go.floofy.dev/config
package main

import (
	"fmt"
	"go.floofy.dev/config"
)

func main() {
	fmt.Println("reading config from ./config.yml!")
	loader := config.NewLoader(config.WithTOML(), config.AutomaticEnv("PREFIX"))
	cfg, err := loader.Load()
	if err != nil {
		panic(err)
    }
	
	val := cfg.Get("owo.da.uwu") // => interface{} (can be `nil`)
	fmt.Println("got owo.da.uwu => %v", val)
}

License

config-loader is released under the Apache 2.0 License.

Owner
Noel
17 year old ordinary developer that tinkers with code, and sometimes it works!
Noel
Comments
A simple multi-layered config loader for Go. Made for smaller projects. No external dependencies.

config ⚠️ Work in progress! A simple multi-layered config loader for Go. Made for smaller projects. No external dependencies. Installation go get -u g

Dec 26, 2021
Quick and easy way to load config files based on a simple set of rules.
Quick and easy way to load config files based on a simple set of rules.

config Quick and easy way to load config files based on a simple set of rules. Project inspired by https://github.com/lorenwest/node-config Important

Apr 9, 2021
Simple, useful and opinionated config loader.

aconfig Simple, useful and opinionated config loader. Rationale There are many solutions regarding configuration loading in Go. I was looking for a si

Dec 26, 2022
Golang config.yaml loader

Description goconfig is a configuration library designed using the following pri

May 31, 2022
Go-config - Config parser for go that supports environment vars and multiple yaml files

go-multiconfig This package is able to parse yaml config files. It supports gett

Jun 23, 2022
go implementation of lightbend's HOCON configuration library https://github.com/lightbend/config

HOCON (Human-Optimized Config Object Notation) Configuration library for working with the Lightbend's HOCON format. HOCON is a human-friendly JSON sup

Dec 3, 2022
🔥🔥 🌈 Golang configuration,use to Viper reading from remote Nacos config systems. Viper remote for Naocs.

Viper remote for Nacos Golang configuration,use to Viper reading from remote Nacos config systems. Viper remote for Naocs. runtime_viper := viper.New(

Dec 6, 2022
Load configuration in cascade from multiple backends into a struct
Load configuration in cascade from multiple backends into a struct

Confita is a library that loads configuration from multiple backends and stores it in a struct. Supported backends Environment variables JSON files Ya

Jan 1, 2023
Load configuration from multiple sources in Go

Multiconfig Load configuration from multiple sources. Multiconfig makes loading/parsing from different configuration sources an easy task. The problem

Dec 2, 2022
A local LKM rootkit loader/dropper that lists available security mechanisms
A local LKM rootkit loader/dropper that lists available security mechanisms

A local LKM rootkit loader Introduction This loader can list both user and kernel mode protections that are present on the system, and additionally di

Dec 12, 2022
Go C-based plugins loader

dlplugin This package is based on the official Go plugin package, but modified to use any dynamic C libraries (Only Linux, FreeBSD, and macOS). It pro

Sep 6, 2022
A Go (golang) environment loader (which loads env vars from a .env file)

A Go (golang) environment loader (which loads env vars from a .env file)

Feb 8, 2022
INI Loader written in Go

go-ini INI Loader written in Go Single threaded & simple Examples Read all params func (app MyApp) onParam(name string, value string) bool { app.c

Feb 11, 2022
Go-based Docker App Loader

go-loader Go-based Docker App Loader Auto-runs uploaded builds with a Docker Container Structures / Home Page /ping Check Docker Container and show st

Feb 11, 2022
Go configuration made easy!

gofigure Go configuration made easy! Just define a struct and call Gofigure Supports strings, ints/uints/floats, slices and nested structs Supports en

Sep 26, 2022
Gonfigure - Read and write config files in go

Gonfigure Reads ini files in golang. Reading INI Files Load file File can be loa

Jan 27, 2022
shops is a simple command-line tool written in Go that helps you simplify the way you manage configuration across a set of machines.

shops is a simple command-line tool written in Go that helps you simplify the way you manage configuration across a set of machines. shops is your configuration management tool of choice when Chef, Puppet, Ansible are all too complicated and all you really want to do is run a bunch of regular shell against a set of hosts.

Jul 5, 2021
Config files for my GitHub profile.

hcltm Threat Modeling with HCL Overview There are many different ways in which a threat model can be documented. From a simple text file, to more in-d

Dec 7, 2021