✨ Refactor testing framework to utilize Ginkgo for unit tests and introduce a new test-all target for running both unit and integration tests. Update README and Taskfile to reflect changes in test execution commands and clarify dependencies. Migrate domain models to a new model package for better separation of concerns.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package parser
|
||||
|
||||
import (
|
||||
"caatsm/internal/domain"
|
||||
"caatsm/internal/model"
|
||||
"caatsm/internal/parsers"
|
||||
)
|
||||
|
||||
@@ -13,8 +13,8 @@ func NewAviationParser() *AviationParser {
|
||||
return &AviationParser{}
|
||||
}
|
||||
|
||||
// Parse parses a raw message string and returns a ParsedMessage
|
||||
func (p *AviationParser) Parse(rawText string) (*domain.ParsedMessage, error) {
|
||||
// Parse parses a raw message string and returns a ParsedTelegram
|
||||
func (p *AviationParser) Parse(rawText string) (*model.ParsedTelegram, error) {
|
||||
// Use the existing Parse function from internal/parsers
|
||||
return parsers.Parse(rawText)
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package parser
|
||||
|
||||
import "caatsm/internal/domain"
|
||||
import "caatsm/internal/model"
|
||||
|
||||
// Parser defines the interface for parsing raw telegram messages
|
||||
type Parser interface {
|
||||
// Parse parses a raw message string and returns a ParsedMessage
|
||||
Parse(rawText string) (*domain.ParsedMessage, error)
|
||||
// Parse parses a raw message string and returns a ParsedTelegram
|
||||
Parse(rawText string) (*model.ParsedTelegram, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user