<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Golang on Chris J Arges</title><link>https://chrisarges.net/tags/golang/</link><description>Recent content in Golang on Chris J Arges</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 20 May 2016 15:53:09 -0500</lastBuildDate><atom:link href="https://chrisarges.net/tags/golang/index.xml" rel="self" type="application/rss+xml"/><item><title>creating a function wrapper in golang</title><link>https://chrisarges.net/posts/2016-05-20-creating-a-function-wrapper-in-golang/</link><pubDate>Fri, 20 May 2016 15:53:09 -0500</pubDate><guid>https://chrisarges.net/posts/2016-05-20-creating-a-function-wrapper-in-golang/</guid><description>&lt;p&gt;Here is a snippet that allows one to create a &amp;lsquo;wrapper&amp;rsquo; function that you can&#10;input a generic function and parameters too in golang. &lt;code&gt;callme&lt;/code&gt; takes a&#10;function and a variadic set of parameters. By using the reflect library we can&#10;properly check number of parameters a function has as well as value types.&#10;Finally we use &lt;code&gt;Call&lt;/code&gt; to call the function with the processed parameters. A use&#10;case for this could be calling a function and allowing for retries or&#10;additional checking.&lt;/p&gt;</description></item></channel></rss>