func (rm *ResultMap) Load(key string) (*Result, error) {
	v, ok := rm.sm.Load(key)
	if !ok {
		return nil, fmt.Errorf("fail to get the value of key %q from results", key)
	}
	t, ok := v.(*Result)
	if !ok {
		return nil, errors.New("stored type in ResultMap is invalid")
	}
	return t, nil
}
Load fetches *Result from ResultMap
package reviewdog
import (
	"errors"
	"fmt"
	"sync"
	"github.com/reviewdog/reviewdog/filter"
	"github.com/reviewdog/reviewdog/proto/rdf"
)
type ResultMap struct {
	sm sync.Map
}
type Result struct {
	Name        string
	Level       string
	Diagnostics []*rdf.Diagnostic
	CmdErr error
}
func (r *Result) CheckUnexpectedFailure() error {
	if r.CmdErr != nil && len(r.Diagnostics) == 0 {
		return fmt.Errorf("%s failed with zero findings: The command itself "+
			"failed (%v) or reviewdog cannot parse the results", r.Name, r.CmdErr)
	}
	return nil
}
func (rm *ResultMap) Store(key string, r *Result) {
	rm.sm.Store(key, r)
}