Monkey patching question

75 views
Skip to first unread message

dick.r...@gmail.com

unread,
Apr 17, 2020, 11:55:39 AM4/17/20
to golang-nuts
An upstream package object is lowercase and thus unexported and thwarts my
attempt at using bouk/monkey (github.com/bouk/monkey).

How should I insert a fmt.Println in one of its methods? Thank you.

Tamás Gulácsi

unread,
Apr 17, 2020, 1:39:46 PM4/17/20
to golang-nuts
If you really needy declare another struct with matching layout (field types, order, etc) and unsafe-convert it.
Reply all
Reply to author
Forward
0 new messages