~sircmpwn/chartsrv-devel

Remove undocumented legend option v1 PROPOSED

Noam Preil: 1
 Remove undocumented legend option

 1 files changed, 0 insertions(+), 8 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/chartsrv-devel/patches/14409/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH] Remove undocumented legend option Export this patch

---
 main.go | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/main.go b/main.go
index 69fcca1..eb1b083 100644
--- a/main.go
+++ b/main.go
@@ -162,12 +162,6 @@ func registerExtension(router chi.Router, extension string, mime string) {
			height = vg.Length(h) * vg.Inch
		}

		// Undocumented option
		var legend string
		if l, ok := args["legend"]; ok {
			legend = l[0]
		}

		// Label template
		var label string
		if l, ok := args["label"]; ok {
@@ -270,8 +264,6 @@ func registerExtension(router chi.Router, extension string, mime string) {
					tmpl.Execute(&label_out, tags)
					p.Legend.Add(label_out.String(), l)
				}
			} else if legend != "" {
				p.Legend.Add(legend, l)
			} else {
				p.Legend.Add(res.Metric, l)
			}
-- 
2.28.0