From 16909235fc7489f9e34b9d2d642cd0029c39437c Mon Sep 17 00:00:00 2001 From: Bruno Fontes Date: Sun, 30 Mar 2025 16:58:01 -0300 Subject: [PATCH] docs: adding basic doc --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 5e66d90..0b45c4e 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ This module reads a RTF and let you get the information per field or column. ## Example: +To read a field at a time: + ```go gct := GoCSVtable{} gct.OpenCSV("file.csv") @@ -28,3 +30,23 @@ This module reads a RTF and let you get the information per field or column. } } ``` + +To read the full row: + +```go + gct := GoCSVtable{} + gct.OpenCSV("file.csv") + + for { + row, err := gct.ReadRow(gct.Row) + if err != nil { + return err + } + + err := gct.Next() + if err == io.EOF { + // File is over... + break + } + } +```