Skip to content

go-packagist/go-zero-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-zero-config

Go Report Card tests GoDoc codecov MIT license

Introduction

go-zero-config is a configuration package for go-zero and go-packagist framework.

Installation

go get github.com/go-packagist/go-zero-config

Usage

package main

import (
    "github.com/go-packagist/framework/foundation"
    "github.com/go-packagist/go-zero-config"
    "github.com/stretchr/testify/assert"
    "testing"
)

func main() {
    app := foundation.NewApplication()

    app.Register(go_zero_config.NewProvider(app.Container, ".test/config.yaml"))

    assert.Equal(t, "test.config", app.MustMake("zero.config").(*go_zero_config.Config).Name)
}

License

The MIT License (MIT). Please see License File for more information.