Commit 76881e5

mo khan <mo@mokhan.ca>
2025-06-23 21:47:50
fix: return an empty list instead of nil
1 parent b4feee1
Changed files (1)
pkg
pkg/git/server.go
@@ -63,7 +63,7 @@ func (gs *Server) setupResourceHandling() {
 
 // ListResources dynamically discovers and returns git resources
 func (gs *Server) ListResources() []mcp.Resource {
-	var resources []mcp.Resource
+	resources := make([]mcp.Resource, 0)
 
 	// Check if this is a git repository
 	gitDir := filepath.Join(gs.repoPath, ".git")