Refactor config provider (#24245)
This PR introduces more abstract about `ConfigProvider` and hides more `ini` references. --------- Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
parent
56d4893b2a
commit
5cf7da63ee
17 changed files with 227 additions and 164 deletions
|
@ -7,7 +7,6 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
ini "gopkg.in/ini.v1"
|
||||
)
|
||||
|
||||
func Test_getCronSettings(t *testing.T) {
|
||||
|
@ -23,11 +22,11 @@ func Test_getCronSettings(t *testing.T) {
|
|||
|
||||
iniStr := `
|
||||
[cron.test]
|
||||
Base = true
|
||||
Second = white rabbit
|
||||
Extend = true
|
||||
BASE = true
|
||||
SECOND = white rabbit
|
||||
EXTEND = true
|
||||
`
|
||||
cfg, err := ini.Load([]byte(iniStr))
|
||||
cfg, err := newConfigProviderFromData(iniStr)
|
||||
assert.NoError(t, err)
|
||||
|
||||
extended := &Extended{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue