mirror of
https://github.com/restic/rest-server.git
synced 2026-04-07 02:31:37 -07:00
small refactoring
This commit is contained in:
@@ -7,17 +7,11 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
context := Context{"/tmp/restic"}
|
||||
context := NewContext("/tmp/restic")
|
||||
|
||||
repo, _ := context.Repository("user")
|
||||
repo.Init()
|
||||
|
||||
errc := context.Init()
|
||||
if errc != nil {
|
||||
log.Println("context initialization failed")
|
||||
return
|
||||
}
|
||||
|
||||
router := Router{context}
|
||||
port := ":8000"
|
||||
log.Printf("start server on port %s", port)
|
||||
|
||||
Reference in New Issue
Block a user