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 + } + } +```