GenerateUUIDWithSuffix generates a UUID with a given module name as a suffix. This is useful for creating unique identifiers with context-specific prefixes.
(module string)
| 26 | // GenerateUUIDWithSuffix generates a UUID with a given module name as a suffix. |
| 27 | // This is useful for creating unique identifiers with context-specific prefixes. |
| 28 | func GenerateUUIDWithSuffix(module string) string { |
| 29 | id := uuid.New() // Generate a new UUID. |
| 30 | uuidStr := id.String() |
| 31 | idWithSuffix := fmt.Sprintf("%s_%s", module, uuidStr) // Append the module as a suffix to the UUID. |
| 32 | return idWithSuffix |
| 33 | } |
| 34 | |
| 35 | // Int64ToBigInt converts an int64 value to a *big.Int. |
| 36 | // This is useful for handling large numbers in computations such as financial transactions. |
no outgoing calls