From ad35cb352b1994355bbbb5a73f99b597524001cc Mon Sep 17 00:00:00 2001 From: Nick White Date: Mon, 23 Mar 2020 11:22:32 +0000 Subject: Don't try to make a graph with one line (it will fail), and don't mark analysis as failed if graph isn't made for that reason --- graph.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'graph.go') diff --git a/graph.go b/graph.go index c56ba48..4ca44a7 100644 --- a/graph.go +++ b/graph.go @@ -51,8 +51,8 @@ func Graph(confs map[string]*Conf, bookname string, w io.Writer) error { } func GraphOpts(confs map[string]*Conf, bookname string, xaxis string, guidelines bool, w io.Writer) error { - if len(confs) == 0 { - return errors.New("No valid confidences") + if len(confs) < 2 { + return errors.New("Not enough valid confidences") } // Organise confs to sort them by page -- cgit v1.2.1-24-ge1ad