From 1fa9157f4b035198ecdd93490e31301c1071317d Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sat, 1 Aug 2020 19:25:16 +0100 Subject: tidying linting and checker errors --- pkg/datamaps/writer.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pkg/datamaps/writer.go') diff --git a/pkg/datamaps/writer.go b/pkg/datamaps/writer.go index cff9f4e..d1da39f 100644 --- a/pkg/datamaps/writer.go +++ b/pkg/datamaps/writer.go @@ -15,6 +15,9 @@ import ( func ExportMaster(opts *Options) error { wb := xlsx.NewFile() sh, err := wb.AddSheet("Master Data") + if err != nil { + return fmt.Errorf("cannot add 'Master Data' sheet to new XLSX file: %v", err) + } // SQLITE CODE @@ -117,7 +120,7 @@ func ExportMaster(opts *Options) error { func appendValueMap(k, v string, values map[string][]string) (map[string][]string, error) { var keyIn bool - for kv, _ := range values { + for kv := range values { if kv == k { keyIn = true break -- cgit v1.2.3