@@ -20,7 +20,7 @@ type Conv struct {
2020 err []byte // Buffer de errores - make([]byte, 0, 64)
2121 errLen int // Longitud actual en err
2222 // Type indicator - most frequently accessed // Type indicator - most frequently accessed
23- Kind Kind // Hot path: type checking
23+ kind Kind // Hot path: type checking (private)
2424
2525 // ✅ OPTIMIZED MEMORY ARCHITECTURE - unsafe.Pointer for complex types
2626 dataPtr unsafe.Pointer // Direct unsafe pointer to data (replaces ptrValue)
@@ -80,42 +80,42 @@ func (c *Conv) anyToBuff(dest buffDest, value any) {
8080
8181 // K.Bool
8282 case bool :
83- c .Kind = K .Bool
83+ c .kind = K .Bool
8484 c .wrBool (dest , v )
8585
8686 // K.Float32
8787 case float32 :
88- c .Kind = K .Float32
88+ c .kind = K .Float32
8989 c .wrFloat32 (dest , v )
9090
9191 // K.Float64
9292 case float64 :
93- c .Kind = K .Float64
93+ c .kind = K .Float64
9494 c .wrFloat64 (dest , v )
9595
9696 // K.Int
9797 case int :
98- c .Kind = K .Int
98+ c .kind = K .Int
9999 c .wrIntBase (dest , int64 (v ), 10 , true )
100100
101101 // K.Int8
102102 case int8 :
103- c .Kind = K .Int8
103+ c .kind = K .Int8
104104 c .wrIntBase (dest , int64 (v ), 10 , true )
105105
106106 // K.Int16
107107 case int16 :
108- c .Kind = K .Int16
108+ c .kind = K .Int16
109109 c .wrIntBase (dest , int64 (v ), 10 , true )
110110
111111 // K.Int32
112112 case int32 :
113- c .Kind = K .Int32
113+ c .kind = K .Int32
114114 c .wrIntBase (dest , int64 (v ), 10 , true )
115115
116116 // K.Int64
117117 case int64 :
118- c .Kind = K .Int64
118+ c .kind = K .Int64
119119 c .wrIntBase (dest , v , 10 , true )
120120
121121 // K.Pointer - Only *string pointer supported
@@ -126,43 +126,43 @@ func (c *Conv) anyToBuff(dest buffDest, value any) {
126126 return
127127 }
128128 // Store content relationship
129- c .Kind = K .Pointer // Correctly set Kind to K.Pointer for *string
129+ c .kind = K .Pointer // Correctly set Kind to K.Pointer for *string
130130 c .dataPtr = unsafe .Pointer (v ) // Store the pointer itself for Apply()
131131 c .wrString (dest , * v )
132132
133133 // K.String
134134 case string :
135- c .Kind = K .String
135+ c .kind = K .String
136136 c .wrString (dest , v )
137137
138138 // K.SliceStr - Special case for []string
139139 case []string :
140140 c .dataPtr = unsafe .Pointer (& v )
141- c .Kind = K .Slice
141+ c .kind = K .Slice
142142
143143 // K.Uint
144144 case uint :
145- c .Kind = K .Uint
145+ c .kind = K .Uint
146146 c .wrIntBase (dest , int64 (v ), 10 , false )
147147
148148 // K.Uint8
149149 case uint8 :
150- c .Kind = K .Uint8
150+ c .kind = K .Uint8
151151 c .wrIntBase (dest , int64 (v ), 10 , false )
152152
153153 // K.Uint16
154154 case uint16 :
155- c .Kind = K .Uint16
155+ c .kind = K .Uint16
156156 c .wrIntBase (dest , int64 (v ), 10 , false )
157157
158158 // K.Uint32
159159 case uint32 :
160- c .Kind = K .Uint32
160+ c .kind = K .Uint32
161161 c .wrIntBase (dest , int64 (v ), 10 , false )
162162
163163 // K.Uint64
164164 case uint64 :
165- c .Kind = K .Uint64
165+ c .kind = K .Uint64
166166 c .wrIntBase (dest , int64 (v ), 10 , false )
167167
168168 // Special cases
@@ -178,14 +178,14 @@ func (c *Conv) anyToBuff(dest buffDest, value any) {
178178// GetKind returns the Kind of the value stored in the Conv
179179// This allows external packages to reuse tinystring's type detection logic
180180func (c * Conv ) GetKind () Kind {
181- return c .Kind
181+ return c .kind
182182}
183183
184184// Apply updates the original string pointer with the current content and auto-releases to pool.
185185// This method should be used when you want to modify the original string directly
186186// without additional allocations.
187187func (t * Conv ) Apply () {
188- if t .Kind == K .Pointer && t .dataPtr != nil {
188+ if t .kind == K .Pointer && t .dataPtr != nil {
189189 // Type assert to *string for Apply() functionality using unsafe pointer
190190 if strPtr := (* string )(t .dataPtr ); strPtr != nil {
191191 * strPtr = t .getString (buffOut )
0 commit comments