summaryrefslogtreecommitdiff
path: root/graph.go
diff options
context:
space:
mode:
authorNick White <git@njw.name>2020-03-23 11:22:32 +0000
committerNick White <git@njw.name>2020-03-23 11:22:32 +0000
commitad35cb352b1994355bbbb5a73f99b597524001cc (patch)
tree1c4c4ed756d41b62938d13b48c8300509dcddbd7 /graph.go
parent3372c864237d2bf18ccd18003db2f23645be3d18 (diff)
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
Diffstat (limited to 'graph.go')
-rw-r--r--graph.go4
1 files changed, 2 insertions, 2 deletions
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