Adds a skeleton for an AlbumCsvReader

This commit is contained in:
2016-01-16 19:18:59 +01:00
parent 150ce1e76e
commit ab201424ad
3 changed files with 234 additions and 1 deletions

21
album_csv_reader.go Normal file
View File

@@ -0,0 +1,21 @@
package main
import (
"fmt"
"io"
)
// AlbumCsvReader can read Album definition from a csv file
type AlbumCsvReader struct {
}
// NewAlbumCsvReader creates a new AlbumCsvReader from a reader
func NewAlbumCsvReader(r io.Reader) *AlbumCsvReader {
return nil
}
// Read get the next line in the CSV and return an Album or an error,
// or io.EOF if stream is closed
func (a *AlbumCsvReader) Read() (*Album, error) {
return nil, fmt.Errorf("Niot uyet implemented")
}