func (s *SyncStore) ReadPuppy(id int16) (puppy.Puppy, error) {
	if puppyData, ok := s.Load(id); ok {
		puppy, _ := puppyData.(puppy.Puppy)
		return puppy, nil
	}
	return puppy.Puppy{}, puppy.Errorf(puppy.ErrIDNotFound, "puppy with ID:%d not found", id)
}
ReadPuppy gets a puppy from the store given an ID
package store
import (
	"sort"
	"sync"
	puppy "github.com/anz-bank/go-course/10_rest/runnerdave/pkg/puppy"
)
type SyncStore struct {
	sync.Mutex
	sync.Map
	nextID int16
}
func NewSyncStore() *SyncStore {
	return &SyncStore{nextID: 1}
}
func (s *SyncStore) CreatePuppy(p puppy.Puppy) error {
	if err := puppy.ValidateValue(p.Value); err != nil {
		return err
	}
	s.Lock()
	defer s.Unlock()
	p.ID = s.nextID
	s.Store(p.ID, p)
	s.nextID++
	return nil
}