diff options
author | Matthew Lemon <matt@matthewlemon.com> | 2020-07-26 19:50:49 +0100 |
---|---|---|
committer | Matthew Lemon <matt@matthewlemon.com> | 2020-07-26 19:50:49 +0100 |
commit | 3d9fcd0c1d56a5f5534163d56c9d65321ded4bc5 (patch) | |
tree | 7363d1f130d08639b001948f8ba7de128a620e6c /pkg/datamaps | |
parent | 474763178383049f882139d7cc352477906727c9 (diff) |
renamed func
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 |