summaryrefslogtreecommitdiff
path: root/populatePackagePB.go
diff options
context:
space:
mode:
Diffstat (limited to 'populatePackagePB.go')
-rw-r--r--populatePackagePB.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/populatePackagePB.go b/populatePackagePB.go
index 6bd3c48..1d9b900 100644
--- a/populatePackagePB.go
+++ b/populatePackagePB.go
@@ -7,7 +7,7 @@ import (
"go.wit.com/lib/config"
)
-func setString(pb proto.Message, varname string, val string) (bool, error) {
+func setString(pb proto.Message, varname string, varvalue string) (bool, error) {
msg := pb.ProtoReflect() // This is the entry point to the reflection API.
descriptor := msg.Descriptor() // Get the message's descriptor, which contains metadata about its fields.
@@ -24,7 +24,7 @@ func setString(pb proto.Message, varname string, val string) (bool, error) {
return false, config.ErrProtoVarNotString
}
- valueToSet := protoreflect.ValueOfString(varname)
+ valueToSet := protoreflect.ValueOfString(varvalue)
// 6. If the field exists and is a string, get its value.
// The value is returned as a protoreflect.Value.