func (am *AtomicManager) Remove(id int) {
	am.lock.Lock()
	defer am.lock.Unlock()
	handlerID := uint32(id)
	if _, ok := am.handlers[handlerID]; ok {
		delete(am.handlers, handlerID)
		return
	}
	am.logger.Debug(fmt.Sprintf("Handler for id:%d not found", id))
}
Remove removes handler with the given id
package notification
import (
	"fmt"
	"sync"
	"sync/atomic"
	"github.com/optimizely/go-sdk/pkg/logging"
)
type Manager interface {
	Add(func(interface{})) (int, error)
	Remove(id int)
	Send(message interface{})
}
type AtomicManager struct {
	handlers map[uint32]func(interface{})
	counter  uint32
	lock     sync.RWMutex
	logger   logging.OptimizelyLogProducer
}
func NewAtomicManager(logger logging.OptimizelyLogProducer) *AtomicManager {
	return &AtomicManager{
		logger:   logger,
		handlers: make(map[uint32]func(interface{})),
	}
}
func (am *AtomicManager) Add(newHandler func(interface{})) (int, error) {
	am.lock.Lock()
	defer am.lock.Unlock()
	atomic.AddUint32(&am.counter, 1)
	am.handlers[am.counter] = newHandler
	return int(am.counter), nil
}