func (s *SyncStore) CreatePuppy(p *puppy.Puppy) (uint32, error) {
	s.mu.Lock()
	defer s.mu.Unlock()
	if i, err := strconv.Atoi(p.Value); err == nil {
		if i < 0 {
			return 0, &puppy.Error{
				Message: "Puppy value can't be less than 0.",
				Code:    puppy.NegativeValue,
			}
		}
	} else {
		return 0, &puppy.Error{
			Message: "Unrecongised puppy value.",
			Code:    puppy.ErrorValueFormat,
		}
	}
	s.nextID++
	p.ID = s.nextID
	s.syncStore.Store(p.ID, *p)
	return p.ID, nil
}
CreatePuppy create a new puppy and store in mapStore.
package puppy
import (
	"strconv"
	"sync"
	puppy "github.com/anz-bank/go-course/09_json/willshen8/pkg/puppy"
)
type SyncStore struct {
	syncStore sync.Map
	nextID    uint32
	mu        sync.Mutex
}
func NewSyncStore() *SyncStore {
	return &SyncStore{syncStore: sync.Map{}}
}