summaryrefslogtreecommitdiff
path: root/core/structs.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/structs.go')
-rw-r--r--core/structs.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/structs.go b/core/structs.go
index 67573cf..a111841 100644
--- a/core/structs.go
+++ b/core/structs.go
@@ -22,7 +22,7 @@ import (
// jsonData is used for both reading from json and for storing the global feeds
// map. contains read mutexes so concurrency can be used.
-type jsonData struct {
+type JsonData struct {
Feeds map[url.URL]*Feed `json:"feeds,omitempty"`
Pages map[url.URL]*Page `json:"pages,omitempty"`
@@ -115,25 +115,25 @@ func (f *Feed) Swap(i, j int) {
// elements so they shuld be able to be accessed at the same time, right?
// Lock locks both feed and page mutexes.
-func (j *jsonData) Lock() {
+func (j *JsonData) Lock() {
j.feedsMu.Lock()
j.pagesMu.Lock()
}
// Unlock unlocks both feed and page mutexes.
-func (j *jsonData) Unlock() {
+func (j *JsonData) Unlock() {
j.feedsMu.Unlock()
j.pagesMu.Unlock()
}
// RLock read-locks both feed and page mutexes.
-func (j *jsonData) RLock() {
+func (j *JsonData) RLock() {
j.feedsMu.RLock()
j.pagesMu.RLock()
}
// RUnlock read-unlocks both feed and page mutexes.
-func (j *jsonData) RUnlock() {
+func (j *JsonData) RUnlock() {
j.feedsMu.RUnlock()
j.pagesMu.RUnlock()
}