diff --git a/CHANGELOG.md b/CHANGELOG.md index dd466d8..608445f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.13.0 + +* removed dir parameter from `Server.Start` + ## 0.12.0 * added local and remote file synchronization diff --git a/cmd/shifu/main.go b/cmd/shifu/main.go index 43b3a4f..f8e2bda 100644 --- a/cmd/shifu/main.go +++ b/cmd/shifu/main.go @@ -39,7 +39,7 @@ func main() { return } - if err := server.Start(nil, dir); err != nil { + if err := server.Start(nil); err != nil { slog.Error("Error starting Shifu", "error", err) } diff --git a/pkg/server.go b/pkg/server.go index 481174c..8d4a8d4 100644 --- a/pkg/server.go +++ b/pkg/server.go @@ -115,7 +115,7 @@ func NewServer(dir string, options ServerOptions) (*Server, error) { // Start starts the Shifu server. // The context.CancelFunc is optional and will be called on server shutdown or error if set. -func (server *Server) Start(cancel context.CancelFunc, dir string) error { +func (server *Server) Start(cancel context.CancelFunc) error { slog.Info("Starting Shifu", "version", version, "directory", cfg.Get().BaseDir) stop := func() { server.cancel() @@ -136,7 +136,7 @@ func (server *Server) Start(cancel context.CancelFunc, dir string) error { } analytics.Init() - server.setupRouter(dir) + server.setupRouter(cfg.Get().BaseDir) <-server.startServer(server.router, stop) return nil }