From 70eecf79704452d600f3edca9dec2e9726dcfe6d Mon Sep 17 00:00:00 2001 From: Nick White Date: Mon, 16 Dec 2019 10:39:51 +0000 Subject: Fix usage message for getpipelinebook, and trim final slashes in lspipeline output --- cmd/getpipelinebook/main.go | 2 +- cmd/lspipeline/main.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'cmd') diff --git a/cmd/getpipelinebook/main.go b/cmd/getpipelinebook/main.go index fc6170c..be80b41 100644 --- a/cmd/getpipelinebook/main.go +++ b/cmd/getpipelinebook/main.go @@ -11,7 +11,7 @@ import ( "rescribe.xyz/bookpipeline" ) -const usage = `Usage: getpipelinebook [-a] [-c] [-v] bookname +const usage = `Usage: getpipelinebook [-a] [-v] bookname Downloads the pipeline results for a book. diff --git a/cmd/lspipeline/main.go b/cmd/lspipeline/main.go index 0128c60..56c8069 100644 --- a/cmd/lspipeline/main.go +++ b/cmd/lspipeline/main.go @@ -6,6 +6,7 @@ import ( "log" "os/exec" "sort" + "strings" "rescribe.xyz/bookpipeline" ) @@ -128,11 +129,11 @@ func getBookStatus(conn LsPipeliner) (inprogress []string, done []string, err er } sort.Sort(donemeta) for _, i := range donemeta { - done = append(done, i.Name) + done = append(done, strings.TrimSuffix(i.Name, "/")) } sort.Sort(inprogressmeta) for _, i := range inprogressmeta { - inprogress = append(inprogress, i.Name) + inprogress = append(inprogress, strings.TrimSuffix(i.Name, "/")) } return -- cgit v1.2.1-24-ge1ad