aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/index
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/index')
-rw-r--r--pkg/index/index.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/index/index.go b/pkg/index/index.go
index f3dc00d..f741708 100644
--- a/pkg/index/index.go
+++ b/pkg/index/index.go
@@ -55,6 +55,14 @@ func (s *SiteIndex) AddSite(site *site.Site) {
s.updateSiteIndexes()
}
+func (s *SiteIndex) RemoveSite(name string) {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+
+ delete(s.sites, name)
+ s.updateSiteIndexes()
+}
+
func (s *SiteIndex) UpdateSiteIndexes() {
s.mu.Lock()
defer s.mu.Unlock()