Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harmonize output formats #85

Closed
mancha1 opened this issue Nov 18, 2014 · 2 comments
Closed

Harmonize output formats #85

mancha1 opened this issue Nov 18, 2014 · 2 comments

Comments

@mancha1
Copy link

mancha1 commented Nov 18, 2014

Hello Alexandre. Many thanks for your great work on this.

A small report: unlike JSON and XML output, CSV-formatted output skips the IP field and begins with the country code. I'm go-ignorant but the below patch might do the trick.

--mancha

--- a/encoder.go
+++ b/encoder.go
@@ -137,6 +137,7 @@ func (f *CSVEncoder) Encode(w http.Respo
        cw := csv.NewWriter(w)
        cw.UseCRLF = f.UseCRLF
        err := cw.Write([]string{
+               record.IP,
                record.CountryCode,
                record.CountryName,
                record.RegionCode,
@fiorix
Copy link
Owner

fiorix commented Nov 18, 2014

Good catch. Will fix this tomorrow.

@fiorix fiorix closed this as completed in cc079e0 Nov 18, 2014
@fiorix
Copy link
Owner

fiorix commented Nov 18, 2014

This change has been deployed and is live now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants