From cc574ab102bae4a904a93a317ef7a5a4c679a8c0 Mon Sep 17 00:00:00 2001 From: Terry Zhao Date: Wed, 1 May 2024 11:01:04 -0700 Subject: [PATCH] fix parameterType.Kind() --- service/session/state.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/service/session/state.go b/service/session/state.go index db8bc9d7..542f5da9 100644 --- a/service/session/state.go +++ b/service/session/state.go @@ -507,9 +507,16 @@ func (s *Session) adjustValue(parameter *state.Parameter, value interface{}) (in switch actual := value.(type) { case string: if textValue, ok := value.(string); ok { + if parameterType.Kind() == reflect.String { return textValue, nil } + if parameterType.Kind() == reflect.Ptr { + if parameterType.Elem().Kind() == reflect.String { + return textValue, nil + } + } + if parameterStructType != nil && parameter.OutputType() != nil { return textValue, nil }