Svilen Markov преди 5 месеца
родител
ревизия
8331c4b305
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      internal/glance/widget-custom-api.go

+ 4 - 0
internal/glance/widget-custom-api.go

@@ -133,6 +133,10 @@ func gJsonResultArrayToDecoratedResultArray(results []gjson.Result) []decoratedG
 	return decoratedResults
 }
 
+func (r *decoratedGJSONResult) Exists(key string) bool {
+	return r.Get(key).Exists()
+}
+
 func (r *decoratedGJSONResult) Array(key string) []decoratedGJSONResult {
 	if key == "" {
 		return gJsonResultArrayToDecoratedResultArray(r.Result.Array())