32 lines
471 B
Go
32 lines
471 B
Go
package q5
|
|
|
|
import "ioutil"
|
|
|
|
type CsvReader struct {
|
|
columns map[string]int32
|
|
values []XValue
|
|
|
|
currLine int32
|
|
}
|
|
|
|
func (this *CsvReader) Load(fileName string) bool {
|
|
f, err := ioutil.ReadFile(fileName)
|
|
if err == nil {
|
|
defer f.Close()
|
|
|
|
}
|
|
return err == nil
|
|
}
|
|
|
|
func (this *CsvReader) NextLine() bool {
|
|
return true
|
|
}
|
|
|
|
func (this *CsvReader) GetValue(fieldName string) *XValue {
|
|
return nil
|
|
}
|
|
|
|
func (this *CsvReader) KeyExists(fieldName string) bool {
|
|
return true
|
|
}
|