refactor: add hot reloading and improve logging functions

- Add command to install `air` for hot reloading in `Makefile`
- Add `dev` command to run the application with hot reload in `Makefile`
- Add `vendor` command to tidy and verify module dependencies in `Makefile`
- Update log synchronization method to use `log.Default().Sync()` in `cmd/cmd.go`
- Change variadic parameter type from `interface{}` to `any` in logging functions
- Remove `Sync` function from `pkg/log/log.go`

ref: https://github.com/uber-go/zap/issues/880
Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
appleboy
2025-03-16 14:18:58 +08:00
parent 051ce0bab4
commit c52f8649a2
3 changed files with 26 additions and 15 deletions

View File

@@ -55,7 +55,7 @@ func init() {
}
func Execute(version string) {
defer log.Sync()
defer log.Default().Sync()
if err := operation.Run(transport, version); err != nil {
log.Fatalf("Run Gitea MCP Server Error: %v", err)
}