Documentation
¶
Index ¶
- func NewTestConfig(sourceDirs []string) parsers.ParserConfig
- type MockFilesystem
- func (m *MockFilesystem) Abs(p string) (string, error)
- func (m *MockFilesystem) AddDir(p string)
- func (m *MockFilesystem) AddFile(p string, content string)
- func (m *MockFilesystem) CountLines(p string) (int, error)
- func (m *MockFilesystem) Create(path string) (io.WriteCloser, error)
- func (m *MockFilesystem) Getwd() (string, error)
- func (m *MockFilesystem) MkdirAll(path string, perm fs.FileMode) error
- func (m *MockFilesystem) Open(path string) (fs.File, error)
- func (m *MockFilesystem) Platform() string
- func (m *MockFilesystem) ReadDir(name string) ([]fs.DirEntry, error)
- func (m *MockFilesystem) ReadFile(p string) ([]string, error)
- func (m *MockFilesystem) Stat(name string) (fs.FileInfo, error)
- func (m *MockFilesystem) WriteFile(path string, data []byte, perm fs.FileMode) error
- type MockParserConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTestConfig ¶
func NewTestConfig(sourceDirs []string) parsers.ParserConfig
NewTestConfig creates a default, permissive config suitable for most parser tests.
Types ¶
type MockFilesystem ¶
type MockFilesystem struct {
filesystem.Platformer
// contains filtered or unexported fields
}
MockFilesystem implements filesystem.Filesystem and filereader.Reader for testing.
func NewMockFilesystem ¶
func NewMockFilesystem(platform string) *MockFilesystem
func (*MockFilesystem) Abs ¶
func (m *MockFilesystem) Abs(p string) (string, error)
Abs correctly calculates the absolute path within the mock filesystem.
func (*MockFilesystem) AddDir ¶
func (m *MockFilesystem) AddDir(p string)
func (*MockFilesystem) AddFile ¶
func (m *MockFilesystem) AddFile(p string, content string)
func (*MockFilesystem) CountLines ¶
func (m *MockFilesystem) CountLines(p string) (int, error)
func (*MockFilesystem) Create ¶
func (m *MockFilesystem) Create(path string) (io.WriteCloser, error)
func (*MockFilesystem) Getwd ¶
func (m *MockFilesystem) Getwd() (string, error)
func (*MockFilesystem) MkdirAll ¶
func (m *MockFilesystem) MkdirAll(path string, perm fs.FileMode) error
--- Unused interface methods ---
func (*MockFilesystem) Platform ¶
func (m *MockFilesystem) Platform() string
type MockParserConfig ¶
MockParserConfig implements the lean parsers.ParserConfig interface for testing.
func (*MockParserConfig) FileFilters ¶
func (m *MockParserConfig) FileFilters() filtering.IFilter
func (*MockParserConfig) Logger ¶
func (m *MockParserConfig) Logger() *slog.Logger
func (*MockParserConfig) SourceDirectories ¶
func (m *MockParserConfig) SourceDirectories() []string
Click to show internal directories.
Click to hide internal directories.