"magic_pdf/vscode:/vscode.git/clone" did not exist on "95f334fb7ad2505e717ab3ae85fda5e6ad314442"
empty.go 577 Bytes
Newer Older
songlinfeng's avatar
songlinfeng committed
1
2
3
4
5
6
/**
# Copyright (c) 2024, HCUOpt CORPORATION.  All rights reserved.
**/

package ldcache

7
import "dcu-container-toolkit/internal/logger"
songlinfeng's avatar
songlinfeng committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

type empty struct {
	logger logger.Interface
	path   string
}

var _ LDCache = (*empty)(nil)

// List always returns nil for an empty ldcache
func (e *empty) List() ([]string, []string) {
	return nil, nil
}

// Lookup logs a debug message and returns nil for an empty ldcache
func (e *empty) Lookup(prefixes ...string) ([]string, []string) {
	e.logger.Debugf("Calling Lookup(%v) on empty ldcache: %v", prefixes, e.path)
	return nil, nil
}