customerimporter

package
v0.0.0-...-4e1e80a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package customerimporter provides ability to read CSV files and extract data from it. At current sate it reads file header (first line), and looks for 'email' column there. If found, it counts how many times each domain was spoted, and returns that values as prints or exports to new .csv file

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OutputDomains

func OutputDomains(print, save bool, filename, sortBy string)

OutputDomains, based on print and save flags, outputs data collected during file analysis. Filename is name of file that will be saved, sortBy allows to chose way of sorting, (by count or in alphabetic order)

func ProcesFile

func ProcesFile(inputPath string)

ProcesFile opens file with path provided in inputPath. Builds reader that moves over it line by line. On first iteration data about header is collected and saved, than it moves to proper content. Throws fatal error if it is not possible to open file or read its content

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL