feat: init repo

This commit is contained in:
Rogee
2024-12-18 19:42:10 +08:00
parent c3f965035c
commit b68316a778
46 changed files with 1770 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
package app
import (
"git.ipao.vip/rogeecn/atom/container"
"git.ipao.vip/rogeecn/atom/utils/opt"
)
func Provide(opts ...opt.Option) error {
o := opt.New(opts...)
var config Config
if err := o.UnmarshalConfig(&config); err != nil {
return err
}
return container.Container.Provide(func() (*Config, error) {
return &config, nil
}, o.DiOptions()...)
}