<div dir="ltr">Hi folk,<div><br></div><div>A few days ago I started to play with Go and the result of that is a small Sender Library for the UnifiedPush Server : <a href="https://github.com/sebastienblanc/upsgosender">https://github.com/sebastienblanc/upsgosender</a></div><div><br></div><div>Usage is pretty simple : </div><div><br></div><div><pre style="font-family:consolas,&#39;liberation mono&#39;,menlo,courier,monospace;font-size:13.6px;margin-top:0px;margin-bottom:0px;font-stretch:normal;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;border-radius:3px;word-break:normal;color:rgb(51,51,51);background-color:rgb(247,247,247)"><span class="gmail-pl-smi" style="box-sizing: border-box;">criteria</span> <span class="gmail-pl-k" style="color:rgb(167,29,93)">:=</span> &amp;Criteria{Alias: []<span class="gmail-pl-k" style="color:rgb(167,29,93)">string</span>{<span class="gmail-pl-s" style="color:rgb(24,54,145)"><span class="gmail-pl-pds" style="box-sizing: border-box;">&quot;</span>seb<span class="gmail-pl-pds" style="box-sizing: border-box;">&quot;</span></span>, <span class="gmail-pl-s" style="color:rgb(24,54,145)"><span class="gmail-pl-pds" style="box-sizing: border-box;">&quot;</span>bob<span class="gmail-pl-pds" style="box-sizing: border-box;">&quot;</span></span>}}
<span class="gmail-pl-smi" style="box-sizing: border-box;">message</span> <span class="gmail-pl-k" style="color:rgb(167,29,93)">:=</span> &amp;Message{Alert: <span class="gmail-pl-s" style="color:rgb(24,54,145)"><span class="gmail-pl-pds" style="box-sizing: border-box;">&quot;</span>hello from #golang sender<span class="gmail-pl-pds" style="box-sizing: border-box;">&quot;</span></span>}
<span class="gmail-pl-smi" style="box-sizing: border-box;">unifiedMessage</span> <span class="gmail-pl-k" style="color:rgb(167,29,93)">:=</span> &amp;UnifiedMessage{Message: *message, <span class="gmail-pl-v" style="color:rgb(237,106,67)">Criteria</span>: *criteria}
<span class="gmail-pl-smi" style="box-sizing: border-box;">settings</span> <span class="gmail-pl-k" style="color:rgb(167,29,93)">:=</span> &amp;Settings{
    <span class="gmail-pl-v" style="color:rgb(237,106,67)">URL</span>:           <span class="gmail-pl-s" style="color:rgb(24,54,145)"><span class="gmail-pl-pds" style="box-sizing: border-box;">&quot;</span><a href="https://mypushserver.com/ag-push">https://mypushserver.com/ag-push</a><span class="gmail-pl-pds" style="box-sizing: border-box;">&quot;</span></span>,
    <span class="gmail-pl-v" style="color:rgb(237,106,67)">ApplicationID</span>: <span class="gmail-pl-s" style="color:rgb(24,54,145)"><span class="gmail-pl-pds" style="box-sizing: border-box;">&quot;</span>58f87fb7-829c-4c6f-a0eb-326d3017a94c<span class="gmail-pl-pds" style="box-sizing: border-box;">&quot;</span></span>,
    <span class="gmail-pl-v" style="color:rgb(237,106,67)">MasterSecret</span>:  <span class="gmail-pl-s" style="color:rgb(24,54,145)"><span class="gmail-pl-pds" style="box-sizing: border-box;">&quot;</span>3366736b-d52c-4115-87d3-c08095e87955<span class="gmail-pl-pds" style="box-sizing: border-box;">&quot;</span></span>}
<span class="gmail-pl-smi" style="box-sizing: border-box;">sender</span> <span class="gmail-pl-k" style="color:rgb(167,29,93)">:=</span> <span class="gmail-pl-c1" style="color:rgb(0,134,179)">NewSender</span>(*settings)
sender.<span class="gmail-pl-c1" style="color:rgb(0,134,179)">send</span>(*unifiedMessage)</pre></div><div><br></div><div><br></div><div>Since, I&#39;m a newbie on Go, PRs are mote than welcome to polish the code or remove any anti-Go-patterns I could have used ;)</div><div><br></div><div>I still need to implement Proxy and Truststore support and add more test but I think it&#39;s a good start. </div><div><br></div><div>Sebi</div><div><br></div><div><br></div></div>