moved handlers from main.go to handlers/handlers.go

This commit is contained in:
2025-11-13 15:16:06 +00:00
parent 7993a2360d
commit f4f44da541
5 changed files with 351 additions and 312 deletions
+3 -4
View File
@@ -76,12 +76,11 @@ type (
)
// ParseTransactionResult parses the XML into entries.
func ParseTransactionResult(data []byte) ([]EntryXML, error) {
var tr TransactionResultXML
func (tr *TransactionResultXML) ParseTransactionResult(data []byte) error {
if err := xml.Unmarshal(data, &tr); err != nil {
return nil, fmt.Errorf("XML unmarshal: %w", err)
return fmt.Errorf("XML unmarshal: %w", err)
}
return tr.Entries, nil
return nil
}
// initMSSQL opens and pings the SQL Server instance localhost\SQLEXPRESS