File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
api/health/connecthandler Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -108,16 +108,11 @@ func convertResult(r health.Result) *healthv1.Result {
108
108
result .Message = structMsg
109
109
}
110
110
} else if msg , ok := r .Details .(string ); ok {
111
- // Convert string to a Struct with a single field "message"
112
- result .Message = & structpb.Struct {
113
- Fields : map [string ]* structpb.Value {
114
- "message" : structpb .NewStringValue (msg ),
115
- },
116
- }
111
+ // Convert string to a Struct with a single field "value"
112
+ result .Message , _ = structpb .NewStruct (map [string ]interface {}{
113
+ "value" : msg ,
114
+ })
117
115
}
118
- } else {
119
- // If no details, set empty struct
120
- result .Message = & structpb.Struct {}
121
116
}
122
117
123
118
// Set error field if exists
Original file line number Diff line number Diff line change 1
1
syntax = "proto3" ;
2
2
package health.v1 ;
3
3
4
- import "google/protobuf/timestamp.proto" ;
5
4
import "google/protobuf/struct.proto" ;
5
+ import "google/protobuf/timestamp.proto" ;
6
6
7
7
option go_package = "github.com/ava-labs/avalanchego/proto/pb/health/v1;healthv1" ;
8
8
You can’t perform that action at this time.
0 commit comments