Documentation
¶
Index ¶
- func Contains(str, substr string) bool
- func ContainsBetweenMarkers(content, expected string) bool
- func CreateFile(t *testing.T, path, content string)
- func CreateModFile(tempDir string) error
- func GenerateTemplContent(packageName string) string
- func PrepareTestConfig(cfg *config.Config, tempDir string)
- func SetupComponentDefine(app *cli.Command, t *testing.T) (string, error)
- func SetupConfig(tempDir string, overrides func(cfg *config.Config)) *config.Config
- func SetupVariantDefine(app *cli.Command, t *testing.T) (string, error)
- func ValidateGeneratedFiles(t *testing.T, paths []string)
- func VerifyFileContent(t *testing.T, filePath, expectedContent string)
- func WriteConfigToFile(filePath string, cfg *config.Config) error
- type MockLogger
- func (m *MockLogger) Blank()
- func (m *MockLogger) Default(message string, args ...any) *logger.LogEntry
- func (m *MockLogger) Error(message string, args ...any) *logger.LogEntry
- func (m *MockLogger) Hint(message string, args ...any) *logger.LogEntry
- func (m *MockLogger) Info(message string, args ...any) *logger.LogEntry
- func (m *MockLogger) Reset()
- func (m *MockLogger) Success(message string, args ...any) *logger.LogEntry
- func (m *MockLogger) Warning(message string, args ...any) *logger.LogEntry
- func (m *MockLogger) WithIndent(enabled bool)
- func (m *MockLogger) WithTimestamp(enabled bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsBetweenMarkers ¶
Helper to check if content exists between guard markers
func CreateModFile ¶
func GenerateTemplContent ¶
Helper to generate templ files with guard markers
func PrepareTestConfig ¶
func SetupComponentDefine ¶
func SetupConfig ¶
func ValidateGeneratedFiles ¶
ValidateGeneratedFiles ensures the specified files exist.
func VerifyFileContent ¶
Helper to verify if content was inserted correctly
Types ¶
type MockLogger ¶
type MockLogger struct { Logs []string // contains filtered or unexported fields }
MockLogger is a mock implementation of the LoggerInterface for testing purposes.
func (*MockLogger) Default ¶
func (m *MockLogger) Default(message string, args ...any) *logger.LogEntry
Default logs a default message.
func (*MockLogger) Error ¶
func (m *MockLogger) Error(message string, args ...any) *logger.LogEntry
Error logs an error message.
func (*MockLogger) Hint ¶
func (m *MockLogger) Hint(message string, args ...any) *logger.LogEntry
Hint logs a hint message.
func (*MockLogger) Info ¶
func (m *MockLogger) Info(message string, args ...any) *logger.LogEntry
Info logs an informational message.
func (*MockLogger) Success ¶
func (m *MockLogger) Success(message string, args ...any) *logger.LogEntry
Success logs a success message.
func (*MockLogger) Warning ¶
func (m *MockLogger) Warning(message string, args ...any) *logger.LogEntry
Warning logs a warning message.
func (*MockLogger) WithIndent ¶
func (m *MockLogger) WithIndent(enabled bool)
WithIndent enables or disables indentation for log messages.
func (*MockLogger) WithTimestamp ¶
func (m *MockLogger) WithTimestamp(enabled bool)
WithTimestamp enables or disables the inclusion of timestamps in log messages.
Click to show internal directories.
Click to hide internal directories.