'golang patch string values on an object, recursive with filtering

Community,

The mission

basic

Implement a func that patches all string fields on an objects

details

  • [done] fields shall only be patched if they match a matcher func
  • [done] value shall be processed via process func
  • patching shall be done recursive
  • it shall also work for []string, []*string and recursive for structs and []struct, []*struct

// update - removed old code



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source