feat: Add debug (#28)

Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/28
Reviewed-by: yp05327 <576951401@qq.com>
Co-authored-by: hiifong <i@hiif.ong>
Co-committed-by: hiifong <i@hiif.ong>
This commit is contained in:
hiifong
2025-04-11 06:48:01 +00:00
committed by yp05327
parent fac6e1d8d1
commit af27b685d4

View File

@@ -35,6 +35,9 @@ func Client() *gitea.Client {
}
opts = append(opts, gitea.SetHTTPClient(httpClient))
}
if flag.Debug {
opts = append(opts, gitea.SetDebugMode())
}
client, err = gitea.NewClient(flag.Host, opts...)
if err != nil {
log.Fatalf("create gitea client err: %v", err)