From a791063d5b817787802314b1732e376ae6657f29 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Mon, 5 Sep 2022 13:23:14 -0400 Subject: [PATCH] Add a parser cache map --- parser/cache.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 parser/cache.go diff --git a/parser/cache.go b/parser/cache.go new file mode 100644 index 0000000..a2881c3 --- /dev/null +++ b/parser/cache.go @@ -0,0 +1,11 @@ +package parser + +// cacheItem stores an item of the parser cache. +type cacheItem struct { + section Section + skimmed bool +} + +// cache stores all modules that have been parsed so far. They are indexed with +// their full path on the filesystem, starting with '/'. +var cache = make(map[string] cacheItem)