INNER CODE UNIT · Go

func

tazjin/nixery · builder/cache.go:45

func (c *LocalCache) manifestFromLocalCache(key string) (json.RawMessage, bool) {
	c.mmtx.RLock()
	defer c.mmtx.RUnlock()

	f, err := os.Open(c.mdir + key)
	if err != nil {
		// This is a debug log statement because failure to
		// read the manifest key is currently expected if it
		// is not cached.
		slog.Debug("failed to read manifest from local cache", "err", err, "manifest", key)

		return nil, false
	}
	defer f.Close()

	m, err := io.ReadAll(f)
	if err != nil {
		slog.Error("failed to read manifest from local cache", "err", err, "manifest", key)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…