@@ -1131,13 +1131,13 @@ func TestPrompt(t *testing.T) {
1131
1131
t .Fatalf ("Unexpected number of fields: %d" , len (promptFrame .Fields ))
1132
1132
}
1133
1133
1134
- if promptFrame .Fields [0 ] != "first name" {
1135
- t .Errorf ("Unexpected field: %s" , promptFrame .Fields [0 ])
1134
+ if promptFrame .Fields [0 ]. Name != "first name" {
1135
+ t .Errorf ("Unexpected field: %s" , promptFrame .Fields [0 ]. Name )
1136
1136
}
1137
1137
1138
1138
if err = g .PromptResponse (context .Background (), PromptResponse {
1139
1139
ID : promptFrame .ID ,
1140
- Responses : map [string ]string {promptFrame .Fields [0 ]: "Clicky" },
1140
+ Responses : map [string ]string {promptFrame .Fields [0 ]. Name : "Clicky" },
1141
1141
}); err != nil {
1142
1142
t .Errorf ("Error responding: %v" , err )
1143
1143
}
@@ -1199,8 +1199,8 @@ func TestPromptWithMetadata(t *testing.T) {
1199
1199
t .Fatalf ("Unexpected number of fields: %d" , len (promptFrame .Fields ))
1200
1200
}
1201
1201
1202
- if promptFrame .Fields [0 ] != "first name" {
1203
- t .Errorf ("Unexpected field: %s" , promptFrame .Fields [0 ])
1202
+ if promptFrame .Fields [0 ]. Name != "first name" {
1203
+ t .Errorf ("Unexpected field: %s" , promptFrame .Fields [0 ]. Name )
1204
1204
}
1205
1205
1206
1206
if promptFrame .Metadata ["key" ] != "value" {
@@ -1209,7 +1209,7 @@ func TestPromptWithMetadata(t *testing.T) {
1209
1209
1210
1210
if err = g .PromptResponse (context .Background (), PromptResponse {
1211
1211
ID : promptFrame .ID ,
1212
- Responses : map [string ]string {promptFrame .Fields [0 ]: "Clicky" },
1212
+ Responses : map [string ]string {promptFrame .Fields [0 ]. Name : "Clicky" },
1213
1213
}); err != nil {
1214
1214
t .Errorf ("Error responding: %v" , err )
1215
1215
}
0 commit comments