wip: v0.0.5

This commit is contained in:
loveuer
2025-04-27 22:14:21 +08:00
parent 25c76aebf2
commit 4801b3de08
22 changed files with 3021 additions and 3 deletions

View File

@ -2,11 +2,19 @@ package main
import (
"context"
"flag"
"github.com/loveuer/ushare/internal/api"
"github.com/loveuer/ushare/internal/opt"
"os/signal"
"syscall"
)
func init() {
flag.BoolVar(&opt.Cfg.Debug, "debug", false, "debug mode")
flag.StringVar(&opt.Cfg.Address, "address", "0.0.0.0:80", "")
flag.Parse()
}
func main() {
ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
defer cancel()