We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 277548e + a3180cb commit 4feb05bCopy full SHA for 4feb05b
commands/ls.go
@@ -213,7 +213,17 @@ type lsContext struct {
213
}
214
215
func (c *lsContext) MarshalJSON() ([]byte, error) {
216
- return json.Marshal(c.Builder)
+ // can't marshal c.Builder directly because Builder type has custom MarshalJSON
217
+ dt, err := json.Marshal(c.Builder.Builder)
218
+ if err != nil {
219
+ return nil, err
220
+ }
221
+ var m map[string]any
222
+ if err := json.Unmarshal(dt, &m); err != nil {
223
224
225
+ m["Current"] = c.Builder.Current
226
+ return json.Marshal(m)
227
228
229
func (c *lsContext) Name() string {
0 commit comments