diff options
author | Runxi Yu <me@runxiyu.org> | 2025-04-06 01:41:43 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-04-06 01:41:43 +0800 |
commit | 1351bbae5610caa1cb6ac9b727ff5296b157273c (patch) | |
tree | 01b2c081816dc75e06d32231948fed3d8df104d1 /cmd | |
parent | Ensure server is ready before Run() (diff) | |
download | forge-1351bbae5610caa1cb6ac9b727ff5296b157273c.tar.gz forge-1351bbae5610caa1cb6ac9b727ff5296b157273c.tar.zst forge-1351bbae5610caa1cb6ac9b727ff5296b157273c.zip |
Slight refactor on NewServer
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/forge/main.go | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/cmd/forge/main.go b/cmd/forge/main.go index 102f4da..07a9bfd 100644 --- a/cmd/forge/main.go +++ b/cmd/forge/main.go @@ -5,8 +5,6 @@ package main import ( "flag" - "log/slog" - "os" "go.lindenii.runxiyu.org/forge" ) @@ -19,14 +17,7 @@ func main() { ) flag.Parse() - s := forge.Server{} - - s.Setup() - - if err := s.LoadConfig(*configPath); err != nil { - slog.Error("loading configuration", "error", err) - os.Exit(1) - } + s := forge.NewServer(*configPath) s.Run() } |