]> Cypherpunks.ru repositories - gocheese.git/blobdiff - gocheese.go
Move everything related to passwords out
[gocheese.git] / gocheese.go
index 9b74ee7d5cf729b6f6f0faf09fb108b26ca896bc..02aa225f252bbbd2461b298b6f59be5d9b942f9e 100644 (file)
@@ -66,6 +66,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.`
 )
 
 var (
+       pkgPyPI        = regexp.MustCompile(`^.*<a href="([^"]+)"[^>]*>(.+)</a><br/>.*$`)
+       Version string = "UNKNOWN"
+
        root             = flag.String("root", "./packages", "Path to packages directory")
        bind             = flag.String("bind", "[::]:8080", "Address to bind to")
        tlsCert          = flag.String("tls-cert", "", "Path to TLS X.509 certificate")
@@ -79,17 +82,8 @@ var (
        maxClients       = flag.Int("maxclients", 128, "Maximal amount of simultaneous clients")
        version          = flag.Bool("version", false, "Print version information")
        warranty         = flag.Bool("warranty", false, "Print warranty information")
-
-       pkgPyPI        = regexp.MustCompile(`^.*<a href="([^"]+)"[^>]*>(.+)</a><br/>.*$`)
-       Version string = "UNKNOWN"
-
-       passwords map[string]Auther = make(map[string]Auther)
 )
 
-type Auther interface {
-       Auth(password string) bool
-}
-
 func mkdirForPkg(w http.ResponseWriter, r *http.Request, dir string) bool {
        path := filepath.Join(*root, dir)
        if _, err := os.Stat(path); os.IsNotExist(err) {