fixedwith

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

README

Infer Column Widths of a Fixed-Width Text File

A fixed-width file use a fixed column width for each column (though not all columns necessarily have the same width) and pads the remaining space on the left or on the right, usually with spaces:

   287540 Smith  Jones  Accountant         $55,000
   204878 Ross   Betsy  Senior Accountant  $66,000
   208417 Arthur Wilbur CEO               $123,000

Parsing a fixed-width file can be difficult. Either, the user has to know the column widths in advance and pass that to a parsing method, or the method has to infer the widths of the columns.

This package Go propose automated infer the columns.


Project inspired by blog post at dev.to

Documentation

Overview

Package fixedwith propose automated infer the columns in fixed-width text file

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InferColumnsIndex

func InferColumnsIndex(reader *bufio.Reader, sampleValue uint) (columnsIndex []uint, err error)

InferColumnsIndex Infer Column Widths of a Fixed-Width Text File

Types

This section is empty.

Jump to

Keyboard shortcuts

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