func (l *Logger) RemoveListeners(flag string) error {
	l.Lock()
	defer l.Unlock()

	if l.Listeners == nil {
		return nil
	}

	listeners, ok := l.Listeners[flag]
	if !ok {
		return nil
	}
	var err error
	for _, l := range listeners {
		if err = l.Stop(); err != nil {
			return err
		}
	}
	delete(l.Listeners, flag)
	return nil
}
// RemoveListeners clears *all* listeners for a Flag.
RemoveListeners clears *all* listeners for a Flag.
// RemoveListeners clears * all * listeners for a Flag .
func (l *Logger) RemoveListeners(flag string) error {
	l.Lock()
	defer l.Unlock()
	if l.Listeners == nil {
		return nil
	}
	listeners, ok := l.Listeners[flag]
	if !ok {
		return nil
	}
	var err error
	for _, l := range listeners {
		if err = l.Stop(); err != nil {
			return err
		}
	}
	delete(l.Listeners, flag)
	return nil
}
func ( l * Logger ) RemoveListeners ( flag string ) error { l . Lock ( ) defer l . Unlock ( ) if l . Listeners == nil { return nil } listeners , ok := l . Listeners [ flag ] if ! ok { return nil } var err error for _ , l := range listeners { if err = l . Stop ( ) ; err != nil { return err } } delete ( l . Listeners , flag ) return nil }
RemoveListeners clears *all* listeners for a Flag.
RemoveListeners clears * all * listeners for a Flag .