@@ -1131,13 +1131,13 @@ func TestPrompt(t *testing.T) {
11311131 t .Fatalf ("Unexpected number of fields: %d" , len (promptFrame .Fields ))
11321132 }
11331133
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 )
11361136 }
11371137
11381138 if err = g .PromptResponse (context .Background (), PromptResponse {
11391139 ID : promptFrame .ID ,
1140- Responses : map [string ]string {promptFrame .Fields [0 ]: "Clicky" },
1140+ Responses : map [string ]string {promptFrame .Fields [0 ]. Name : "Clicky" },
11411141 }); err != nil {
11421142 t .Errorf ("Error responding: %v" , err )
11431143 }
@@ -1199,8 +1199,8 @@ func TestPromptWithMetadata(t *testing.T) {
11991199 t .Fatalf ("Unexpected number of fields: %d" , len (promptFrame .Fields ))
12001200 }
12011201
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 )
12041204 }
12051205
12061206 if promptFrame .Metadata ["key" ] != "value" {
@@ -1209,7 +1209,7 @@ func TestPromptWithMetadata(t *testing.T) {
12091209
12101210 if err = g .PromptResponse (context .Background (), PromptResponse {
12111211 ID : promptFrame .ID ,
1212- Responses : map [string ]string {promptFrame .Fields [0 ]: "Clicky" },
1212+ Responses : map [string ]string {promptFrame .Fields [0 ]. Name : "Clicky" },
12131213 }); err != nil {
12141214 t .Errorf ("Error responding: %v" , err )
12151215 }
0 commit comments