csv-go-parser

Simple go script that converts csv file into a json document.

CSV Input:

id,first_name,last_name,email,avatar,ip_address
1,Pauline,Hirth,[email protected],https://robohash.org/doloremdignissimosoccaecati.png?size=50x50&set=set1,199.109.72.212
2,Gilly,Challicombe,[email protected],https://robohash.org/voluptatumomnisaliquid.png?size=50x50&set=set1,14.139.200.228
3,Laverna,Ratledge,[email protected],https://robohash.org/quiavoluptatemplaceat.png?size=50x50&set=set1,22.254.66.241
4,Clary,Forbes,[email protected],https://robohash.org/temporequidolor.png?size=50x50&set=set1,234.201.73.224
5,Alia,Bilyard,[email protected],https://robohash.org/eumetneque.png?size=50x50&set=set1,172.242.193.201
6,Giacobo,Hulle,[email protected],https://robohash.org/autemodioporro.png?size=50x50&set=set1,177.34.216.2

JSON output:

[
  {
    "last_name": "last_name",
    "email": "email",
    "avatar": "avatar",
    "ip_address": "ip_address"
  },
  {
    "last_name": "Hirth",
    "email": "[email protected]",
    "avatar": "https://robohash.org/doloremdignissimosoccaecati.png?size=50x50&set=set1",
    "ip_address": "199.109.72.212"
  },
  {
    "last_name": "Challicombe",
    "email": "[email protected]",
    "avatar": "https://robohash.org/voluptatumomnisaliquid.png?size=50x50&set=set1",
    "ip_address": "14.139.200.228"
  },
  {
    "last_name": "Ratledge",
    "email": "[email protected]",
    "avatar": "https://robohash.org/quiavoluptatemplaceat.png?size=50x50&set=set1",
    "ip_address": "22.254.66.241"
  },
  {
    "last_name": "Forbes",
    "email": "[email protected]",
    "avatar": "https://robohash.org/temporequidolor.png?size=50x50&set=set1",
    "ip_address": "234.201.73.224"
  },
  {
    "last_name": "Bilyard",
    "email": "[email protected]",
    "avatar": "https://robohash.org/eumetneque.png?size=50x50&set=set1",
    "ip_address": "172.242.193.201"
  },
  {
    "last_name": "Hulle",
    "email": "[email protected]",
    "avatar": "https://robohash.org/autemodioporro.png?size=50x50&set=set1",
    "ip_address": "177.34.216.2"
  }
]

GitHub

View Github