Skip to content

Commit

Permalink
move formatters iface declaration to call site
Browse files Browse the repository at this point in the history
  • Loading branch information
gavincabbage committed Mar 31, 2019
1 parent 94ce460 commit 92eccee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions chiv.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ func (a *archiver) archive(table string, bucket string) error {
}
}

type formatter interface {
Begin([]*sql.ColumnType) error
Write([]sql.RawBytes) error
End() error
}

func (a *archiver) download(wc io.WriteCloser, table string, errs chan error) {
var w formatter
switch a.config.format {
Expand Down
6 changes: 0 additions & 6 deletions formatters.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ var (
ErrRecordLength = errors.New("record length does not match number of columns")
)

type formatter interface {
Begin([]*sql.ColumnType) error
Write([]sql.RawBytes) error
End() error
}

// csvFormatter formats columns in CSV format.
type csvFormatter struct {
w *csv.Writer
Expand Down

0 comments on commit 92eccee

Please sign in to comment.