From bf9430bf4052d5e9f3b646b84d8ad2f6ff856110 Mon Sep 17 00:00:00 2001 From: Timo Beckers Date: Mon, 2 May 2022 14:33:56 +0200 Subject: [PATCH] coll: add cs.RewriteMaps deprecation notice Signed-off-by: Timo Beckers --- collection.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/collection.go b/collection.go index 8fe869088..60ba99188 100644 --- a/collection.go +++ b/collection.go @@ -75,6 +75,9 @@ func (cs *CollectionSpec) Copy() *CollectionSpec { // when calling NewCollection. Any named maps are removed from CollectionSpec.Maps. // // Returns an error if a named map isn't used in at least one program. +// +// Deprecated: Pass CollectionOptions.MapReplacements when loading the Collection +// instead. This function will be removed in version 1.0. func (cs *CollectionSpec) RewriteMaps(maps map[string]*Map) error { for symbol, m := range maps { // have we seen a program that uses this symbol / map