mirror of
https://github.com/restic/rest-server.git
synced 2026-09-26 05:51:24 -07:00
Run goimports on htpasswd.go
This commit is contained in:
committed by
Zlatko Čalušić
parent
3e4edd3dd8
commit
67a0f63773
+7
-7
@@ -38,11 +38,11 @@ import (
|
|||||||
|
|
||||||
// HtpasswdFile is a map for usernames to passwords.
|
// HtpasswdFile is a map for usernames to passwords.
|
||||||
type HtpasswdFile struct {
|
type HtpasswdFile struct {
|
||||||
mutex sync.Mutex
|
mutex sync.Mutex
|
||||||
path string
|
path string
|
||||||
stat os.FileInfo
|
stat os.FileInfo
|
||||||
throttle chan struct{}
|
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,
|
// NewHtpasswdFromFile reads the users and passwords from a htpasswd file and returns them. If an error is encountered,
|
||||||
@@ -54,9 +54,9 @@ func NewHtpasswdFromFile(path string) (*HtpasswdFile, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
h := &HtpasswdFile{
|
h := &HtpasswdFile{
|
||||||
mutex: sync.Mutex{},
|
mutex: sync.Mutex{},
|
||||||
path: path,
|
path: path,
|
||||||
stat: stat,
|
stat: stat,
|
||||||
throttle: make(chan struct{}),
|
throttle: make(chan struct{}),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user