mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-06 00:25:43 +00:00
feat: new version check (#102)
This commit is contained in:
1 parent
701ea59035
commit
33f6325bf7
19 files changed
+235
-91
No files matched your search
@@ -1,7 +0,0 @@
|
||||
|
||||
_______ ______ .______ _______ _______ _______
|
||||
/ _____| / __ \ | _ \ | ____|| ____|| \
|
||||
| | __ | | | | | |_) | | |__ | |__ | .--. |
|
||||
| | |_ | | | | | | ___/ | __| | __| | | | |
|
||||
| |__| | | `--' | | | | |____ | |____ | '--' |
|
||||
\______| \______/ | _| |_______||_______||_______/
|
||||
+2
-15
@@ -2,28 +2,15 @@ package main
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"fmt"
|
||||
"github.com/GopeedLab/gopeed/pkg/rest"
|
||||
"github.com/GopeedLab/gopeed/cmd"
|
||||
"github.com/GopeedLab/gopeed/pkg/rest/model"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//go:embed banner.txt
|
||||
var banner string
|
||||
|
||||
func main() {
|
||||
cfg := &model.StartConfig{
|
||||
Network: "tcp",
|
||||
Address: "127.0.0.1:9999",
|
||||
Storage: model.StorageBolt,
|
||||
}
|
||||
fmt.Println(banner)
|
||||
srv, listener, err := rest.BuildServer(cfg)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
fmt.Printf("Server start success on http://%s\n", listener.Addr().String())
|
||||
if err := srv.Serve(listener); err != nil && err != http.ErrServerClosed {
|
||||
panic(err)
|
||||
}
|
||||
cmd.Start(cfg)
|
||||
}
|
||||
Reference in new issue
Block a user