code: func NewReferenceStore(jsonPath string) (Store, error) {
  	abspath, err := filepath.Abs(jsonPath)
  	if err != nil {
  		return nil, err
  	}
  
  	store := &store{
  		jsonPath:            abspath,
  		Repositories:        make(map[string]repository),
  		referencesByIDCache: make(map[digest.Digest]map[string]reference.Named),
  	}
  	// Load the json file if it exists, otherwise create it.
  	if err := store.reload(); os.IsNotExist(err) {
  		if err := store.save(); err != nil {
  			return nil, err
  		}
  	} else if err != nil {
  		return nil, err
  	}
  	return store, nil
  }
docs: // NewReferenceStore creates a new reference store, tied to a file path where
  // the set of references are serialized in JSON format.