diff options
Diffstat (limited to 'store/layered_store_hints.go')
-rw-r--r-- | store/layered_store_hints.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/store/layered_store_hints.go b/store/layered_store_hints.go index 6154af7c9..064f4f326 100644 --- a/store/layered_store_hints.go +++ b/store/layered_store_hints.go @@ -9,3 +9,23 @@ const ( LSH_NO_CACHE LayeredStoreHint = iota LSH_MASTER_ONLY ) + +func hintsContains(hints []LayeredStoreHint, contains LayeredStoreHint) bool { + for _, hint := range hints { + if hint == contains { + return true + } + } + return false +} + +func hintsContainsAny(hints []LayeredStoreHint, contains ...LayeredStoreHint) bool { + for _, hint := range hints { + for _, hint2 := range contains { + if hint == hint2 { + return true + } + } + } + return false +} |