Skip to main content
Glama
parser_test.go746 B
package parser_test import ( "path/filepath" "github.com/st3v3nmw/sourcerer-mcp/internal/parser" "github.com/stretchr/testify/suite" ) type ParserBaseTestSuite struct { suite.Suite parser *parser.Parser workspaceRoot string } func (s *ParserBaseTestSuite) SetupSuite() { s.workspaceRoot = filepath.Join("..", "..", "testdata") } func (s *ParserBaseTestSuite) getChunks(filePath string) map[string]*parser.Chunk { file, err := s.parser.Chunk(filePath) s.Require().NoError(err) s.Require().NotNil(file) chunks := make(map[string]*parser.Chunk) for _, chunk := range file.Chunks { chunks[chunk.Path] = chunk } return chunks } func (s *GoParserTestSuite) TearDownSuite() { if s.parser != nil { s.parser.Close() } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/st3v3nmw/sourcerer-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server