From 860f2963c273be0f68465944b266755165d4c24c Mon Sep 17 00:00:00 2001 From: Tarak Ben Youssef Date: Thu, 26 Oct 2023 23:27:49 -0600 Subject: [PATCH] add deprecation warning to doc string --- runtime/stdlib/random.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/runtime/stdlib/random.go b/runtime/stdlib/random.go index 3016002be7..72eefcb293 100644 --- a/runtime/stdlib/random.go +++ b/runtime/stdlib/random.go @@ -71,7 +71,15 @@ func NewRevertibleRandomFunction(generator RandomGenerator) StandardLibraryValue // `unsafeRandom` related constants and functions will be deleted // when the function is deprecated -const unsafeRandomFunctionDocString = revertibleRandomFunctionDocString +const unsafeRandomFunctionDocString = ` +Warning: this function will be deprecated, use revertibleRandom function instead. + +Returns a pseudo-random number. + +NOTE: The use of this function is unsafe if not used correctly. + +Follow best practices to prevent security issues when using this function +` var unsafeRandomFunctionType = revertibleRandomFunctionType