From b064c5ca29a0120590a30ece013e8f633aca3830 Mon Sep 17 00:00:00 2001 From: kawashima Date: Mon, 11 Dec 2023 14:43:39 +0900 Subject: [PATCH] bump up version to 0.0.18 --- app.go | 7 +++++-- version.go | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app.go b/app.go index 2bf1521..79edf3a 100644 --- a/app.go +++ b/app.go @@ -416,7 +416,7 @@ func (a *app) printResult(result *parser.Result, results []*parser.Result) { var builder strings.Builder w := func(r *parser.Result) { if a.dest.header && a.dest.output == TSV.String() { - writeTSVHeader(r.Labels[0]) + writeTSVHeader(r.Labels[0], a.dest.lineNum) } for i, data := range r.Data { if i > 0 { @@ -501,6 +501,9 @@ func pipeJoin(s []string) string { return strings.Join(s, "|") } -func writeTSVHeader(line []string) { +func writeTSVHeader(line []string, lineNumber bool) { + if lineNumber { + line = append([]string{"index"}, line...) + } fmt.Println(strings.Join(line, "\t")) } diff --git a/version.go b/version.go index 7702dbb..303574d 100644 --- a/version.go +++ b/version.go @@ -2,6 +2,6 @@ package main const Name = "alpen" -const Version = "0.0.17" +const Version = "0.0.18" var Revision = "HEAD"