func (b *Binding) InSingletonScope() {
	var instance Any
	var err error

	originalFactory := b.factory

	b.factory = func() (Any, error) {
		if instance == nil {
			b.once.Do(func() {
				instance, err = originalFactory()
			})
		}
		return instance, err
	}
}
// InSingletonScope declares dependency as singleton
InSingletonScope declares dependency as singleton
// InSingletonScope declares dependency as singleton
func (b *Binding) InSingletonScope() {
	var instance Any
	var err error
	originalFactory := b.factory
	b.factory = func() (Any, error) {
		if instance == nil {
			b.once.Do(func() {
				instance, err = originalFactory()
			})
		}
		return instance, err
	}
}
func ( b * Binding ) InSingletonScope ( ) { var instance Any var err error originalFactory := b . factory b . factory = func ( ) ( Any , error ) { if instance == nil { b . once . Do ( func ( ) { instance , err = originalFactory ( ) } ) } return instance , err } }
InSingletonScope declares dependency as singleton
InSingletonScope declares dependency as singleton