go-kratos/kratos · error
unknown field kind: %v
Error message
unknown field kind: %v
What it means
Error "unknown field kind: %v" thrown in go-kratos/kratos.
Source
Thrown at encoding/form/proto_decode.go:232
return protoreflect.ValueOfFloat32(float32(v)), nil
case protoreflect.DoubleKind:
v, err := strconv.ParseFloat(value, 64) //nolint:mnd
if err != nil {
return protoreflect.Value{}, err
}
return protoreflect.ValueOfFloat64(v), nil
case protoreflect.StringKind:
return protoreflect.ValueOfString(value), nil
case protoreflect.BytesKind:
v, err := base64.StdEncoding.DecodeString(value)
if err != nil {
return protoreflect.Value{}, err
}
return protoreflect.ValueOfBytes(v), nil
case protoreflect.MessageKind, protoreflect.GroupKind:
return parseMessage(fd.Message(), value)
default:
panic(fmt.Sprintf("unknown field kind: %v", fd.Kind()))
}
}
func parseMessage(md protoreflect.MessageDescriptor, value string) (protoreflect.Value, error) {
var msg proto.Message
switch md.FullName() {
case "google.protobuf.Timestamp":
if value == nullStr {
break
}
t, err := time.ParseInLocation(time.RFC3339Nano, value, time.Local)
if err != nil {
return protoreflect.Value{}, err
}
msg = timestamppb.New(t)
case "google.protobuf.Duration":
if value == nullStr {
breakView on GitHub (pinned to 668db92c2c)
When it happens
Trigger: Thrown at encoding/form/proto_decode.go:232 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of go-kratos/kratos@668db92c2c (2026-08-16).
Data as JSON: /api/errors/13a74d7657b87d4c.
Report an issue: GitHub.