diff options
Diffstat (limited to 'pkg/datamaps')
-rw-r--r-- | pkg/datamaps/reader.go | 6 | ||||
-rw-r--r-- | pkg/datamaps/reader_test.go | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/pkg/datamaps/reader.go b/pkg/datamaps/reader.go index bb4cad7..892e4d8 100644 --- a/pkg/datamaps/reader.go +++ b/pkg/datamaps/reader.go @@ -147,9 +147,9 @@ func ReadXLSX(ssheet string) FileData { return outer } -// DMLFromDB fetches a slice of DatamapLine from the database given +// DatamapFromDB fetches a slice of DatamapLine from the database given // the name of a datamap. -func DMLFromDB(name string, db *sql.DB) ([]DatamapLine, error) { +func DatamapFromDB(name string, db *sql.DB) ([]DatamapLine, error) { var out []DatamapLine @@ -185,7 +185,7 @@ func DMLFromDB(name string, db *sql.DB) ([]DatamapLine, error) { // from the populated spreadsheet file file. func ExtractDBDM(name string, file string, db *sql.DB) (ExtractedData, error) { xdata := ReadXLSX(file) - ddata, err := DMLFromDB(name, db) // this will need to return a []DatamapLine + ddata, err := DatamapFromDB(name, db) // this will need to return a []DatamapLine if err != nil { return nil, err diff --git a/pkg/datamaps/reader_test.go b/pkg/datamaps/reader_test.go index af804f6..79d636e 100644 --- a/pkg/datamaps/reader_test.go +++ b/pkg/datamaps/reader_test.go @@ -125,7 +125,7 @@ func TestDMLSliceFromDatabase(t *testing.T) { {7, "Parrots Name"}, } - data, _ := DMLFromDB("First Datamap", db) + data, _ := DatamapFromDB("First Datamap", db) for _, c := range cases { got := data[c.index].Key |