Skip to content

Commit

Permalink
code refactored
Browse files Browse the repository at this point in the history
  • Loading branch information
guneyin committed Jun 22, 2023
1 parent 47be8ca commit c33788d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
9 changes: 0 additions & 9 deletions importer/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,3 @@ func GetBrokerByName(name string) (*BrokerAdapter, error) {

return NewBrokerAdapter(b)
}

func Import(b broker.TBroker, content []byte) (*entity.Transactions, error) {
ba, err := NewBrokerAdapter(b)
if err != nil {
return nil, err
}

return ba.Parse(content)
}
3 changes: 1 addition & 2 deletions importer/importer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package importer_test

import (
"fmt"
"github.com/guneyin/gobist-broker/broker"
"github.com/guneyin/gobist-broker/entity"
"github.com/guneyin/gobist-broker/importer"
"os"
Expand Down Expand Up @@ -49,7 +48,7 @@ func importFile(b *importer.BrokerAdapter, t string) (*entity.Transactions, erro
return nil, err
}

return importer.Import(broker.Garanti, file)
return b.Parse(file)
}

func assertError(t *testing.T, err error) {
Expand Down

0 comments on commit c33788d

Please sign in to comment.