From b0036d006b651f4c709d779a55f32f1281a956d0 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Mon, 4 Jan 2021 19:01:15 +0100 Subject: [PATCH] Unexport users map in htpasswd struct --- htpasswd.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htpasswd.go b/htpasswd.go index 334ef97..263952e 100644 --- a/htpasswd.go +++ b/htpasswd.go @@ -50,7 +50,7 @@ type HtpasswdFile struct { path string stat os.FileInfo throttle chan struct{} - Users map[string]string + users map[string]string } // NewHtpasswdFromFile reads the users and passwords from a htpasswd file and returns them. If an error is encountered, @@ -130,7 +130,7 @@ func (h *HtpasswdFile) Reload() error { // Replace the Users map h.mutex.Lock() - h.Users = users + h.users = users h.mutex.Unlock() _ = r.Close() @@ -178,7 +178,7 @@ func (h *HtpasswdFile) Validate(user string, password string) bool { _ = h.ReloadCheck() h.mutex.Lock() - realPassword, exists := h.Users[user] + realPassword, exists := h.users[user] h.mutex.Unlock() if !exists {