(ifc interface{})
| 166 | } |
| 167 | |
| 168 | func 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 | } |