GitRoot

Craft your forge // Build your project // Grow your community freely
 1// SPDX-FileCopyrightText: 2026 Romain Maneschi <romain@gitroot.dev>
 2//
 3// SPDX-License-Identifier: MIT
 4
 5package model
 6
 7import "github.com/tidwall/gjson"
 8
 9type IteratorItem struct {
10	Item  string `json:"item"`
11	Exist bool   `json:"exist"`
12}
13
14func IteratorItemFromString(res string) IteratorItem {
15	jsonRes := gjson.Parse(res)
16	return IteratorItem{
17		Item:  jsonRes.Get("item").String(),
18		Exist: jsonRes.Get("exist").Bool(),
19	}
20}