main.go
// socle is a read-only web host for local git repositories:
// browsing of committed state at refs, and anonymous fetch over smart HTTP.
// Nothing in it can write to a repo.
package main
import (
"flag"
"log"
)
func main() {
configPath := flag.String("config", "", "path to the socle config file (required; there is no default location)")
flag.Parse()
if *configPath == "" {
log.Fatal("socle: the -config flag is required")
}
cfg, err := loadConfig(*configPath)
if err != nil {
log.Fatal("socle: ", err)
}
repos, warnings := openAll(cfg)
for _, w := range warnings {
log.Print("socle: ", w)
}
log.Printf("socle: opened %d repos", len(repos))
// The HTTP serve layer is the next piece to land here;
// until it does, a successful start just reports what it would serve, and exits.
}
main.go · 807 B · 717173c127