Skip to content

Commit 25dc33e

Browse files
author
Stefan Tudose
committed
fix godoc format
1 parent 1cda8f9 commit 25dc33e

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

doc.go

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
// csvdecoder is a tool for parsing and deserializing CSV values into Go objects.
22
// It follows the same usage pattern as the Rows scanning using database/sql package.
33
// It relies on encoding/csv for the actual csv parsing.
4-
4+
//
55
// csvdecoder allows to iterate through the CSV records (using 'Next')
66
// and scan the fields into target variables or fields of variables (using 'Scan').
7-
// The 'Next' and 'Scan' methods are not thread-safe and are not expected to be called concurrently.
8-
7+
// The methods 'Next' and 'Scan' are not thread-safe and are not expected to be called concurrently.
8+
//
99
// csvdecoder supports converting CSV fields into any of the following types:
10-
// - `*string`
11-
// - `*int`, `*int8`, `*int16`, `*int32`, `*int64`
12-
// - `*uint`, `*uint8`, `*uint16`, `*uint32`, `*uint64`
13-
// - `*bool`
14-
// - `*float32`, `*float64`
15-
// - a slice of values. Note that the CSV field must be a valid JSON array. If not a JSON array, a custom decoder implementing the `csvdecoder.Interface` interface must be implemented.
16-
// - an array of values. Note that the CSV field must be a valid JSON array. If not a JSON array, a custom decoder implementing the `csvdecoder.Interface` interface must be implemented.
17-
// - a pointer to any type implementing the `csvdecoder.Interface` interface
18-
10+
// *string
11+
// *int, *int8, *int16, *int32, *int64
12+
// *uint, *uint8, *uint16, *uint32, *uint64
13+
// *bool
14+
// *float32, *float64
15+
// a slice of values. Note that the CSV field must be a valid JSON array. If not a JSON array, a custom decoder implementing the csvdecoder.Interface interface must be implemented.
16+
// an array of values. Note that the CSV field must be a valid JSON array. If not a JSON array, a custom decoder implementing the csvdecoder.Interface interface must be implemented.
17+
// a pointer to any type implementing the csvdecoder.Interface interface
18+
//
1919
// csvdecoder uses the same terminology as package encoding/csv:
2020
// A csv file contains zero or more records. Each record contains one or more
2121
// fields separated by the fields separator (the "comma"). The fields separator character
2222
// can be configured to be another character than comma.
2323
// Each record is separated by the newline character. The final record may
2424
// optionally be followed by a newline character.
25-
25+
//
2626
// The behavior of the decoder can be configured by passing one of following options when creating the decoder:
27-
// - Comma: the character that separates values. The default value is comma.
28-
// - IgnoreHeaders: if set to true, the first line will be ignored. This is useful when the CSV file contains a header line.
29-
// - IgnoreUnmatchingFields: if set to true, the number of fields and scan targets are allowed to be different. By default, if they don't match exactly it will cause an error.
30-
27+
// Comma: the character that separates values. The default value is comma.
28+
// IgnoreHeaders: if set to true, the first line will be ignored. This is useful when the CSV file contains a header line.
29+
// IgnoreUnmatchingFields: if set to true, the number of fields and scan targets are allowed to be different. By default, if they don't match exactly it will cause an error.
30+
//
3131
// See README.md for more info.
3232
package csvdecoder

0 commit comments

Comments
 (0)