I have a couple of cases where I have the same underlying value being represented as multiple types.
Example :
userIDString := r.URL.Query("id")
userID, err := strconv.Atoi(userIDString)
I need to use both the above variables at different places.
Similarly
recordSeparator = rune(30)
recordSeparatorString = string(30)
Is my approach to naming such variables considered idiomatic go ? If not what would be the ideal naming convention for such cases ?
PS: I don't think this question is primarily opinion based, I'm looking for answers referencing the naming conventions in popular go projects / standard lib.