X-Git-Url: http://www.git.cypherpunks.ru/?p=gocheese.git;a=blobdiff_plain;f=gocheese.go;h=02aa225f252bbbd2461b298b6f59be5d9b942f9e;hp=9b74ee7d5cf729b6f6f0faf09fb108b26ca896bc;hb=ad6b9b1dca039678e7c48fe07e864b614e01158f;hpb=2b83ac5db8551f70614672b2d326272b35d064d3
diff --git a/gocheese.go b/gocheese.go
index 9b74ee7..02aa225 100644
--- a/gocheese.go
+++ b/gocheese.go
@@ -66,6 +66,9 @@ along with this program. If not, see .`
)
var (
+ pkgPyPI = regexp.MustCompile(`^.*]*>(.+)
.*$`)
+ 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(`^.*]*>(.+)
.*$`)
- 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) {