docs: adding basic doc
This commit is contained in:
		
							parent
							
								
									4e501a6ab7
								
							
						
					
					
						commit
						16909235fc
					
				
							
								
								
									
										22
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								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
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user