package middlewares

import (
	"go.ipao.vip/atom/container"
	"go.ipao.vip/atom/opt"
)

func Provide(opts ...opt.Option) error {
	if err := container.Container.Provide(func() (*Middlewares, error) {
		obj := &Middlewares{}
		if err := obj.Prepare(); err != nil {
			return nil, err
		}

		return obj, nil
	}); err != nil {
		return err
	}
	return nil
}
