| 1 | package modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/ |
| 2 | |
| 3 | import ( |
| 4 | "reflectscip-go gomod github.com/golang/go/src go1.25 reflect/" |
| 5 | "slicesscip-go gomod github.com/golang/go/src go1.25 slices/" |
| 6 | ) |
| 7 | |
| 8 | func newPtrscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/newPtr().() reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Valuescip-go gomod github.com/golang/go/src go1.25 reflect/Value# { |
| 9 | return reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Newscip-go gomod github.com/golang/go/src go1.25 reflect/New().(reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.TypeForscip-go gomod github.com/golang/go/src go1.25 reflect/TypeFor().[any]()) |
| 10 | } |
| 11 | |
| 12 | // NewNullValue creates a new Value with a nil value. |
| 13 | func NewNullValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewNullValue().() *Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value# { |
| 14 | return NewValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewValue().(newPtrscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/newPtr().()) |
| 15 | } |
| 16 | |
| 17 | // IsNull returns true if the value is null. |
| 18 | func (v *Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#) IsNullscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#IsNull().() bool { |
| 19 | return v.UnpackKindsscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#UnpackKinds().(reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Pointerscip-go gomod github.com/golang/go/src go1.25 reflect/Pointer., reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Interfacescip-go gomod github.com/golang/go/src go1.25 reflect/Interface.).isNullscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#isNull().() |
| 20 | } |
| 21 | |
| 22 | func (v *Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#) isNullscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#isNull().() bool { |
| 23 | // This logic can be cleaned up. |
| 24 | unpacked, err := v.UnpackUntilKindsscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#UnpackUntilKinds().(reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Chanscip-go gomod github.com/golang/go/src go1.25 reflect/Chan., reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Funcscip-go gomod github.com/golang/go/src go1.25 reflect/Func., reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Mapscip-go gomod github.com/golang/go/src go1.25 reflect/Map., reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Pointerscip-go gomod github.com/golang/go/src go1.25 reflect/Pointer., reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.UnsafePointerscip-go gomod github.com/golang/go/src go1.25 reflect/UnsafePointer., reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Interfacescip-go gomod github.com/golang/go/src go1.25 reflect/Interface., reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Slicescip-go gomod github.com/golang/go/src go1.25 reflect/Slice.) |
| 25 | if err != nil { |
| 26 | return false |
| 27 | } |
| 28 | return unpacked.valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#value..IsNilscip-go gomod github.com/golang/go/src go1.25 reflect/Value#IsNil().() |
| 29 | } |
| 30 | |
| 31 | // NewStringValue creates a new Value with a string value. |
| 32 | func NewStringValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewStringValue().(x string) *Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value# { |
| 33 | res := newPtrscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/newPtr().() |
| 34 | res.Elemscip-go gomod github.com/golang/go/src go1.25 reflect/Value#Elem().().Setscip-go gomod github.com/golang/go/src go1.25 reflect/Value#Set().(reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.ValueOfscip-go gomod github.com/golang/go/src go1.25 reflect/ValueOf().(x)) |
| 35 | return NewValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewValue().(res) |
| 36 | } |
| 37 | |
| 38 | // IsString returns true if the value is a string. |
| 39 | func (v *Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#) IsStringscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#IsString().() bool { |
| 40 | return v.UnpackKindsscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#UnpackKinds().(reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Pointerscip-go gomod github.com/golang/go/src go1.25 reflect/Pointer., reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Interfacescip-go gomod github.com/golang/go/src go1.25 reflect/Interface.).isStringscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#isString().() |
| 41 | } |
| 42 | |
| 43 | func (v *Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#) isStringscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#isString().() bool { |
| 44 | return v.valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#value..Kindscip-go gomod github.com/golang/go/src go1.25 reflect/Value#Kind().() == reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Stringscip-go gomod github.com/golang/go/src go1.25 reflect/String. |
| 45 | } |
| 46 | |
| 47 | // StringValue returns the string value of the Value. |
| 48 | func (v *Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#) StringValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#StringValue().() (string, error) { |
| 49 | unpacked := v.UnpackKindsscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#UnpackKinds().(reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Pointerscip-go gomod github.com/golang/go/src go1.25 reflect/Pointer., reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Interfacescip-go gomod github.com/golang/go/src go1.25 reflect/Interface.) |
| 50 | if !unpacked.isStringscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#isString().() { |
| 51 | return "", ErrUnexpectedTypescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/ErrUnexpectedType#{ |
| 52 | Expectedscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/ErrUnexpectedType#Expected.: TypeStringscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/TypeString., |
| 53 | Actualscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/ErrUnexpectedType#Actual.: v.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#Type().(), |
| 54 | } |
| 55 | } |
| 56 | return unpacked.valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#value..Stringscip-go gomod github.com/golang/go/src go1.25 reflect/Value#String().(), nil |
| 57 | } |
| 58 | |
| 59 | // StringLen returns the length of the string. |
| 60 | func (v *Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#) StringLenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#StringLen().() (int, error) { |
| 61 | val, err := v.StringValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#StringValue().() |
| 62 | if err != nil { |
| 63 | return 0, err |
| 64 | } |
| 65 | return len(val), nil |
| 66 | } |
| 67 | |
| 68 | // StringIndexRange returns a new string containing the values between the start and end indexes. |
| 69 | // Comparable to go's string[start:end]. |
| 70 | func (v *Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#) StringIndexRangescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#StringIndexRange().(start, end int) (*Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#, error) { |
| 71 | strVal, err := v.StringValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#StringValue().() |
| 72 | if err != nil { |
| 73 | return nil, err |
| 74 | } |
| 75 | |
| 76 | inBytes := []rune(strVal) |
| 77 | l := len(inBytes) |
| 78 | |
| 79 | if start < 0 { |
| 80 | start = l + start |
| 81 | } |
| 82 | if end < 0 { |
| 83 | end = l + end |
| 84 | } |
| 85 | |
| 86 | resBytes := make([]rune, 0) |
| 87 | |
| 88 | if start > end { |
| 89 | for i := start; i >= end; i-- { |
| 90 | resBytes = append(resBytes, inBytes[i]) |
| 91 | } |
| 92 | } else { |
| 93 | for i := start; i <= end; i++ { |
| 94 | resBytes = append(resBytes, inBytes[i]) |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | res := string(resBytes) |
| 99 | |
| 100 | return NewStringValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewStringValue().(res), nil |
| 101 | } |
| 102 | |
| 103 | // NewIntValue creates a new Value with an int value. |
| 104 | func NewIntValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewIntValue().(x int64) *Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value# { |
| 105 | res := newPtrscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/newPtr().() |
| 106 | res.Elemscip-go gomod github.com/golang/go/src go1.25 reflect/Value#Elem().().Setscip-go gomod github.com/golang/go/src go1.25 reflect/Value#Set().(reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.ValueOfscip-go gomod github.com/golang/go/src go1.25 reflect/ValueOf().(x)) |
| 107 | return NewValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewValue().(res) |
| 108 | } |
| 109 | |
| 110 | // IsInt returns true if the value is an int. |
| 111 | func (v *Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#) IsIntscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#IsInt().() bool { |
| 112 | return v.UnpackKindsscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#UnpackKinds().(reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Pointerscip-go gomod github.com/golang/go/src go1.25 reflect/Pointer., reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Interfacescip-go gomod github.com/golang/go/src go1.25 reflect/Interface.).isIntscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#isInt().() |
| 113 | } |
| 114 | |
| 115 | func (v *Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#) isIntscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#isInt().() bool { |
| 116 | return slicesscip-go gomod github.com/golang/go/src go1.25 slices/.Containsscip-go gomod github.com/golang/go/src go1.25 slices/Contains().([]reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Kindscip-go gomod github.com/golang/go/src go1.25 reflect/Kind#{reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Intscip-go gomod github.com/golang/go/src go1.25 reflect/Int., reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Int8scip-go gomod github.com/golang/go/src go1.25 reflect/Int8., reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Int16scip-go gomod github.com/golang/go/src go1.25 reflect/Int16., reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Int32scip-go gomod github.com/golang/go/src go1.25 reflect/Int32., reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Int64scip-go gomod github.com/golang/go/src go1.25 reflect/Int64.}, v.valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#value..Kindscip-go gomod github.com/golang/go/src go1.25 reflect/Value#Kind().()) |
| 117 | } |
| 118 | |
| 119 | // IntValue returns the int value of the Value. |
| 120 | func (v *Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#) IntValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#IntValue().() (int64, error) { |
| 121 | unpacked := v.UnpackKindsscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#UnpackKinds().(reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Pointerscip-go gomod github.com/golang/go/src go1.25 reflect/Pointer., reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Interfacescip-go gomod github.com/golang/go/src go1.25 reflect/Interface.) |
| 122 | if !unpacked.isIntscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#isInt().() { |
| 123 | return 0, ErrUnexpectedTypescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/ErrUnexpectedType#{ |
| 124 | Expectedscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/ErrUnexpectedType#Expected.: TypeIntscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/TypeInt., |
| 125 | Actualscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/ErrUnexpectedType#Actual.: v.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#Type().(), |
| 126 | } |
| 127 | } |
| 128 | return unpacked.valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#value..Intscip-go gomod github.com/golang/go/src go1.25 reflect/Value#Int().(), nil |
| 129 | } |
| 130 | |
| 131 | // NewFloatValue creates a new Value with a float value. |
| 132 | func NewFloatValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewFloatValue().(x float64) *Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value# { |
| 133 | res := newPtrscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/newPtr().() |
| 134 | res.Elemscip-go gomod github.com/golang/go/src go1.25 reflect/Value#Elem().().Setscip-go gomod github.com/golang/go/src go1.25 reflect/Value#Set().(reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.ValueOfscip-go gomod github.com/golang/go/src go1.25 reflect/ValueOf().(x)) |
| 135 | return NewValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewValue().(res) |
| 136 | } |
| 137 | |
| 138 | // IsFloat returns true if the value is a float. |
| 139 | func (v *Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#) IsFloatscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#IsFloat().() bool { |
| 140 | return v.UnpackKindsscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#UnpackKinds().(reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Pointerscip-go gomod github.com/golang/go/src go1.25 reflect/Pointer., reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Interfacescip-go gomod github.com/golang/go/src go1.25 reflect/Interface.).isFloatscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#isFloat().() |
| 141 | } |
| 142 | |
| 143 | func (v *Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#) isFloatscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#isFloat().() bool { |
| 144 | return slicesscip-go gomod github.com/golang/go/src go1.25 slices/.Containsscip-go gomod github.com/golang/go/src go1.25 slices/Contains().([]reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Kindscip-go gomod github.com/golang/go/src go1.25 reflect/Kind#{reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Float32scip-go gomod github.com/golang/go/src go1.25 reflect/Float32., reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Float64scip-go gomod github.com/golang/go/src go1.25 reflect/Float64.}, v.valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#value..Kindscip-go gomod github.com/golang/go/src go1.25 reflect/Value#Kind().()) |
| 145 | } |
| 146 | |
| 147 | // FloatValue returns the float value of the Value. |
| 148 | func (v *Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#) FloatValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#FloatValue().() (float64, error) { |
| 149 | unpacked := v.UnpackKindsscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#UnpackKinds().(reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Pointerscip-go gomod github.com/golang/go/src go1.25 reflect/Pointer., reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Interfacescip-go gomod github.com/golang/go/src go1.25 reflect/Interface.) |
| 150 | if !unpacked.IsFloatscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#IsFloat().() { |
| 151 | return 0, ErrUnexpectedTypescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/ErrUnexpectedType#{ |
| 152 | Expectedscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/ErrUnexpectedType#Expected.: TypeFloatscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/TypeFloat., |
| 153 | Actualscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/ErrUnexpectedType#Actual.: v.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#Type().(), |
| 154 | } |
| 155 | } |
| 156 | return unpacked.valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#value..Floatscip-go gomod github.com/golang/go/src go1.25 reflect/Value#Float().(), nil |
| 157 | } |
| 158 | |
| 159 | // NewBoolValue creates a new Value with a bool value. |
| 160 | func NewBoolValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewBoolValue().(x bool) *Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value# { |
| 161 | res := newPtrscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/newPtr().() |
| 162 | res.Elemscip-go gomod github.com/golang/go/src go1.25 reflect/Value#Elem().().Setscip-go gomod github.com/golang/go/src go1.25 reflect/Value#Set().(reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.ValueOfscip-go gomod github.com/golang/go/src go1.25 reflect/ValueOf().(x)) |
| 163 | return NewValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewValue().(res) |
| 164 | } |
| 165 | |
| 166 | // IsBool returns true if the value is a bool. |
| 167 | func (v *Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#) IsBoolscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#IsBool().() bool { |
| 168 | return v.UnpackKindsscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#UnpackKinds().(reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Pointerscip-go gomod github.com/golang/go/src go1.25 reflect/Pointer., reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Interfacescip-go gomod github.com/golang/go/src go1.25 reflect/Interface.).isBoolscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#isBool().() |
| 169 | } |
| 170 | |
| 171 | func (v *Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#) isBoolscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#isBool().() bool { |
| 172 | return v.valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#value..Kindscip-go gomod github.com/golang/go/src go1.25 reflect/Value#Kind().() == reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Boolscip-go gomod github.com/golang/go/src go1.25 reflect/Bool. |
| 173 | } |
| 174 | |
| 175 | // BoolValue returns the bool value of the Value. |
| 176 | func (v *Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#) BoolValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#BoolValue().() (bool, error) { |
| 177 | unpacked := v.UnpackKindsscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#UnpackKinds().(reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Pointerscip-go gomod github.com/golang/go/src go1.25 reflect/Pointer., reflectscip-go gomod github.com/golang/go/src go1.25 reflect/.Interfacescip-go gomod github.com/golang/go/src go1.25 reflect/Interface.) |
| 178 | if !unpacked.IsBoolscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#IsBool().() { |
| 179 | return false, ErrUnexpectedTypescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/ErrUnexpectedType#{ |
| 180 | Expectedscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/ErrUnexpectedType#Expected.: TypeBoolscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/TypeBool., |
| 181 | Actualscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/ErrUnexpectedType#Actual.: v.Typescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#Type().(), |
| 182 | } |
| 183 | } |
| 184 | return unpacked.valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#value..Boolscip-go gomod github.com/golang/go/src go1.25 reflect/Value#Bool().(), nil |
| 185 | } |