func (S *State) Del(Node string, Name string) bool {
	if !S.IsSet {
		return false
	}
	S.lck.Lock()
	defer S.lck.Unlock()
	var I Inst
	var exist bool
	var Count int
	if I, exist = S.Agents[Node]; exist != true {
		return false
	}
	if Count, exist = I[Name]; exist != true {
		return false
	}
	if Count <= 1 {
		delete(I, Name)
	} else {
		I[Name] = Count - 1
	}
	S.Agents[Node] = I
	return true
}
Del This removes an entry from the Map it returns false which means that such an entry itself is not available in the map
package agentstate
import (
	"sync"
)
type Inst map[string]int
type State struct {
	lck    sync.Mutex
	Agents map[string]Inst
	Count  int
	IsSet  bool
}
func NewState() *State {
	var AS State
	AS.Agents = make(map[string]Inst)
	AS.Count = 0
	AS.IsSet = true
	return &AS
}
func (S *State) Add(Node string, Name string, Count int) bool {
	if !S.IsSet {
		return false
	}
	S.lck.Lock()
	defer S.lck.Unlock()
	var I Inst
	var exist bool
	if I, exist = S.Agents[Node]; exist != true {
		I = make(Inst)
		I[Name] = 0
	}
	I[Name] = I[Name] + Count
	S.Agents[Node] = I
	return true
}