Initial release
This commit is contained in:
parent
1aa66ec832
commit
3ccd531ddc
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) <year> <copyright holders>
|
Copyright (c) <2022> <Laurent ULRICH (laurentu@gmail.com)>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
package csvparser
|
||||||
|
|
||||||
|
type EncloserId int
|
||||||
|
|
||||||
|
const (
|
||||||
|
DoubleQuotes EncloserId = iota
|
||||||
|
SingleQuotes
|
||||||
|
RoundBrackets
|
||||||
|
SquareBrackets
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
type CsvParser struct {
|
||||||
|
enclosers []EncloserId
|
||||||
|
delimiter rune
|
||||||
|
}
|
||||||
|
|
||||||
|
func (parser *CsvParser) Init() {
|
||||||
|
parser.enclosers = append(parser.enclosers, DoubleQuotes, SquareBrackets)
|
||||||
|
parser.delimiter = ' '
|
||||||
|
}
|
||||||
|
func (parser *CsvParser) Parse(line string) {
|
||||||
|
}
|
Loading…
Reference in New Issue