Skip to content

Commit a0a72cf

Browse files
comments
1 parent f5564ef commit a0a72cf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Examples/runtimes/go/utils/exampleUtils.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,17 @@ func AreMapsEqual(map1, map2 map[string]string) bool {
4444
}
4545

4646
func HandleError(err error) {
47-
// Error handling is limited to panic for simplicity.
48-
// In production code, errors should be properly handled.
47+
// Error handling is limited to panic for demonstration purposes only.
48+
// In your code, errors should be properly handled.
4949
if err != nil {
5050
panic(err)
5151
}
5252
}
5353

5454
func GenerateAes256KeyBytes() []byte {
5555
key := make([]byte, aesKeyBytes)
56-
// Using crypto/rand for cryptographically secure random numbers for simplicity of examples.
56+
// crypto/rand is used here for demonstration.
57+
// In your code, you should implement a key generation strategy that meets your security needs.
5758
_, err := rand.Read(key)
5859
HandleError(err)
5960
return key

0 commit comments

Comments
 (0)