aboutsummaryrefslogtreecommitdiff
path: root/cmd/csv/main.go
diff options
context:
space:
mode:
authorleshe4ka46 <alex9102naid1@ya.ru>2025-10-27 20:36:28 +0300
committerleshe4ka46 <alex9102naid1@ya.ru>2025-10-28 13:42:21 +0300
commitbb833561aa74f02970aee13cdc75973b29716491 (patch)
tree0914668e11dbf825979f7419ce1bc78294cd3f7f /cmd/csv/main.go
parente17a425dfb3382310fb5863f516dacdca9f44956 (diff)
# This is a combination of 2 commits.
# This is the 1st commit message: unmarshal all formats, merge them in the single table, users are truly unique # This is the commit message #2: i
Diffstat (limited to 'cmd/csv/main.go')
-rw-r--r--cmd/csv/main.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmd/csv/main.go b/cmd/csv/main.go
new file mode 100644
index 0000000..e1e5174
--- /dev/null
+++ b/cmd/csv/main.go
@@ -0,0 +1,18 @@
+package main
+
+import (
+ "airlines/pkg/adapters/csv"
+ "airlines/pkg/localstore"
+)
+
+func main() {
+ yamlData, err := csv.UnmarshallCsv("/home/alex/ds-data/tab.csv", true)
+ if err != nil {
+ panic(err)
+ }
+
+ store := localstore.NewLocalStore()
+
+ yamlData.DumpToDb(store)
+ store.ExportAllCSVs("/tmp/ds")
+}