MCPcopy Index your code
hub / github.com/apache/devlake / stripZeroByte

Function stripZeroByte

backend/helpers/pluginhelper/api/batch_save.go:168–176  ·  view source on GitHub ↗
(ifc interface{})

Source from the content-addressed store, hash-verified

166}
167
168func stripZeroByte(ifc interface{}) {
169 v := reflect.ValueOf(ifc).Elem()
170 for i := 0; i < v.NumField(); i++ {
171 if v.Field(i).Type() == reflect.TypeOf("") {
172 stripped := strings.ReplaceAll(v.Field(i).String(), "\u0000", "")
173 v.Field(i).Set(reflect.ValueOf(stripped))
174 }
175 }
176}

Callers 2

Test_stripZeroByteFunction · 0.85
AddMethod · 0.85

Calls 1

StringMethod · 0.45

Tested by 1

Test_stripZeroByteFunction · 0.68