Skip to content

Commit

Permalink
add deprecation warning to doc string
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarak Ben Youssef authored and SupunS committed Oct 30, 2023
1 parent 10aafc5 commit 860f296
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion runtime/stdlib/random.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 860f296

Please sign in to comment.