From a6da34dad26952fa37c1435f876a7af7b7756676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Gomez?= Date: Wed, 9 Oct 2024 14:45:14 +0200 Subject: [PATCH] Comment explaining the need for go/object_dashboard_DataSourceRef_custom_unmarshal.tmpl --- .../go/object_dashboard_DataSourceRef_custom_unmarshal.tmpl | 1 + 1 file changed, 1 insertion(+) diff --git a/config/templates/go/object_dashboard_DataSourceRef_custom_unmarshal.tmpl b/config/templates/go/object_dashboard_DataSourceRef_custom_unmarshal.tmpl index f0b1bcf3..80c7317e 100644 --- a/config/templates/go/object_dashboard_DataSourceRef_custom_unmarshal.tmpl +++ b/config/templates/go/object_dashboard_DataSourceRef_custom_unmarshal.tmpl @@ -1,4 +1,5 @@ {{- define "object_dashboard_DataSourceRef_custom_unmarshal" }} +{{- /* Non-standard unmarshalling, to support "legacy" datasource references. ie: older versions of Grafana reference datasources directly by their name */ -}} func (resource *DataSourceRef) UnmarshalJSON(raw []byte) error { if raw == nil { return nil