fix(go func factory): fix func factory example

previous code did not run because outside main() code was done
Merge pull request #662 from vvo/patch-1

fix(go func factory): fix func factory example