config

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2022 License: MIT Imports: 4 Imported by: 4

README

config

⚙️ Simple configuration parser

Usage

Parse config files

package main

import (
	"github.com/vitego/boilerplate"
	"github.com/vitego/config"
	"log"
)

func main() {
	err := config.Parse("config", boilerplate.Config)
	if err != nil {
		log.Fatal(err)
	}
}

Get value

package test

import (
	"github.com/vitego/config"
)

func test() string {
	return config.Get("app.name")
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(path string) string

func Parse

func Parse(dir string, files embed.FS) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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