mirror of
https://github.com/kjanat/articulate-parser.git
synced 2026-10-13 03:35:27 +02:00
refactor: extract base exporter, add sentinel errors, document unused fields
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/kjanat/articulate-parser/internal/apperrors"
|
||||
"github.com/kjanat/articulate-parser/internal/interfaces"
|
||||
)
|
||||
|
||||
@@ -56,7 +57,7 @@ func (f *Factory) CreateExporter(format string) (interfaces.Exporter, error) {
|
||||
case FormatHTML, formatAliasHTML:
|
||||
return NewHTMLExporter(f.htmlCleaner, f.logger), nil
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported export format: %s", format)
|
||||
return nil, fmt.Errorf("%w: %s", apperrors.ErrUnsupportedFormat, format)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user