<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Golang on Nicola Iarocci</title>
    <link>https://nicolaiarocci.com/tags/golang/</link>
    <description>Recent content in Golang on Nicola Iarocci</description>
    <generator>Hugo -- 0.143.1</generator>
    <language>en</language>
    <copyright>Produced / Written / Maintained by Nicola Iarocci since 2010</copyright>
    <lastBuildDate>Thu, 28 Aug 2025 10:07:05 +0200</lastBuildDate>
    <atom:link href="https://nicolaiarocci.com/tags/golang/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Invoicetronic, or what I&#39;ve been working on recently</title>
      <link>https://nicolaiarocci.com/invoicetronic-or-what-ive-been-working-on-recently/</link>
      <pubDate>Thu, 28 Aug 2025 10:07:05 +0200</pubDate>
      <guid>https://nicolaiarocci.com/invoicetronic-or-what-ive-been-working-on-recently/</guid>
      <description>&lt;p&gt;The most recent project I worked on is &lt;a href=&#34;https://invoicetronic.com/en/&#34;&gt;Invoicetronic&lt;/a&gt;, a modern API for complete management of the electronic invoicing cycle in Italy (FatturaPA/SDI).&lt;/p&gt;
&lt;p&gt;We had long used an internal API by our accounting software, which was also utilized by thousands of our end users. We decided to make our experience and expertise available to external developers, allowing them to integrate electronic invoicing into their applications quickly via a public API. Thus, the Invoicetronic project was born.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>The most recent project I worked on is <a href="https://invoicetronic.com/en/">Invoicetronic</a>, a modern API for complete management of the electronic invoicing cycle in Italy (FatturaPA/SDI).</p>
<p>We had long used an internal API by our accounting software, which was also utilized by thousands of our end users. We decided to make our experience and expertise available to external developers, allowing them to integrate electronic invoicing into their applications quickly via a public API. Thus, the Invoicetronic project was born.</p>
<p>We had made a similar choice in the past with the open-source release of <a href="https://github.com/FatturaElettronica/FatturaElettronica.NET">FatturaElettronica.NET</a>, also a library initially created for internal use. <a href="https://python-eve.org">Eve</a> and <a href="https://python-cerberus.org">Cerberus</a> for Python started as an internal projects too.</p>
<p>We didn&rsquo;t limit ourselves to just opening our API to the public. That alone would have been challenging (as any veteran well knows, opening a private product to a broader and more diverse audience is already a real challenge in itself). We seized the opportunity, years after its creation and with millions of invoices having passed through the system in the meantime, to refresh the design, improve performance, and add <a href="https://invoicetronic.com/en/features/">important features</a> that proved stimulating to implement.</p>
<p>I certainly wasn&rsquo;t lacking experience with REST APIs, but I still learned a lot, especially while working on the tools accessory to the actual API. An example is the client <a href="https://invoicetronic.com/en/docs/sdk/">SDKs</a>. We support all the most common programming languages: JavaScript/TypeScript, Python, PHP, Java, C#, Ruby, and Go. They&rsquo;re built using OpenAPI Generator, a tool I initially underestimated but which turned out to be excellent, thanks also to the remarkable ecosystem built by the community. Working on the SDKs also provided me with the opportunity to improve my Continuous Integration skills. Beyond the usual test-containerization-staging-deploy cycle, every API update is followed by an automatic release of all SDKs, each with deployment on both GitHub and the reference package manager for the language: PyPI, NuGet, npm, etc. Seemingly obvious tasks (such as inferring the new API version number from CI and then reusing it in the package version of individual SDKs) required considerable brainstorming.</p>
<p>The Invoicetronic project, which gave me the most satisfaction and taught me the most, is <a href="https://invoicetronic.com/en/docs/cli/#invoice"><code>invoice-cli</code></a>. This <a href="https://github.com/invoicetronic/invoice-cli">open source</a> command-line tool enables sending and receiving electronic invoices from the terminal, and is available for Linux, Mac, and Windows. You don&rsquo;t need to be a developer or study the API in depth to use it, and, not secondarily, it can be conveniently inserted into a script. A trivial usage example would be:</p>
<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-fallback" data-lang="fallback"><span style="display:flex;"><span># send a single invoice.
</span></span><span style="display:flex;"><span>$ invoice send file1.xml
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span># send multiple invoices, then delete the local copies.
</span></span><span style="display:flex;"><span>$ invoice send *.xml --delete
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span># individually send multiple files.
</span></span><span style="display:flex;"><span>$ invoice send file1.xml file2.xml file3.xml
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span># receive all unread invoices.
</span></span><span style="display:flex;"><span>$ invoice receive --unread
</span></span></code></pre></div><p>From my point of view, though, the interesting thing about <code>invoice</code> is that it&rsquo;s written in Go, a language I hadn&rsquo;t yet had the chance to use professionally. A veteran would likely find fault with the implementation details and the chosen approach, but I hope they&rsquo;ll be merciful, considering I&rsquo;m a beginner in this space. We could have used C#, which is now our reference language. Still, in the case of the command-line, Go seemed like a better choice, first of all, for the exceptional support in creating native multi-platform binaries, then for performance both cold and hot, and for deployment simplicity. If I had to make another command-line tool, I would return to Go rather than orient myself toward languages I know better and with which I&rsquo;m more comfortable, like Python and C# (speaking of C#, the recent improvements in AOT and cross-platform support are remarkable - we&rsquo;re on the right track, come on guys!)</p>
<p>A second stimulating project was the <a href="https://invoicetronic.com/en/features/#llm-and-ai-integration">Invoicetronic MCP Server.</a> We were interested in having developers interact with the Invoicetronic API via LLM, and an MCP server serves precisely that purpose. Fortunately, C# has an excellent official library (still in preview but sufficiently mature) that simplifies the work, and implementing and deploying a first experimental version was relatively simple. There is enormous potential in this area, and I want to stay on top of it: objective achieved (I also gave a <a href="https://nicolaiarocci.com/im-speaking-at-devmarche-summer-ai-afternoon/">couple</a> of <a href="https://nicolaiarocci.com/mcp-or-connecting-our-apps-to-llms/">presentations</a> on the topic).</p>
<p>We released Invoicetronic for our own use, but I hope other developers will adopt it. Throughout many years of activity, our primary client has consistently been the end-user, the company that utilizes our accounting applications. In recent years, we also engaged with developers, but only in the context of our open-source projects. I&rsquo;d love to serve them professionally as well.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Heading to Go: A Look at Building a Video Encoder (meetup)</title>
      <link>https://nicolaiarocci.com/heading-to-go-a-look-at-building-a-video-encoder-meetup/</link>
      <pubDate>Wed, 08 Feb 2023 07:05:25 +0100</pubDate>
      <guid>https://nicolaiarocci.com/heading-to-go-a-look-at-building-a-video-encoder-meetup/</guid>
      <description>&lt;p&gt;We&amp;rsquo;re doing a &lt;a href=&#34;https://www.meetup.com/it-IT/devromagna/events/291027334/&#34;&gt;DevRomagna meetup&lt;/a&gt; this month, and I think it will be a
super-interesting one. It&amp;rsquo;s titled &lt;em&gt;Heading to Go: A Look at Building a Video
Encoder&lt;/em&gt; and the presenter will be Daniel Enrico Botta, a C# software engineer
who recently switched to Go for his video encoding projects. Here&amp;rsquo;s the abstract:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This talk will discuss the experience of moving from C# to Go for a video
coding project. The pros and cons of using Go, a modern and efficient
programming language, and how it compares to other languages will be shown.
In addition, the use of FFmpeg, an open-source tool for video encoding, and
how it was used to create the video encoder will be discussed. Advice will be
given on using Go and Ffmpeg for future projects. Together, the benefits of
using these tools for video encoding will be understood.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>We&rsquo;re doing a <a href="https://www.meetup.com/it-IT/devromagna/events/291027334/">DevRomagna meetup</a> this month, and I think it will be a
super-interesting one. It&rsquo;s titled <em>Heading to Go: A Look at Building a Video
Encoder</em> and the presenter will be Daniel Enrico Botta, a C# software engineer
who recently switched to Go for his video encoding projects. Here&rsquo;s the abstract:</p>
<blockquote>
<p>This talk will discuss the experience of moving from C# to Go for a video
coding project. The pros and cons of using Go, a modern and efficient
programming language, and how it compares to other languages will be shown.
In addition, the use of FFmpeg, an open-source tool for video encoding, and
how it was used to create the video encoder will be discussed. Advice will be
given on using Go and Ffmpeg for future projects. Together, the benefits of
using these tools for video encoding will be understood.</p></blockquote>
<p>Like me, Daniel has a C# background, so it will be interesting to see the whys
and hows he picked Golang for his video encoding work. I&rsquo;m curious about his
perspective on both languages and what he learned from adopting a new stack.
Leaving the safe path to adventure into unknown territory is a safe way to
broaden knowledge and improve self-confidence, or at least it was for me when I
added Python to my tool belt. In surprising and unexpected ways, most of the
new expertise also proved invaluable in my C# &amp; F# work.</p>
<p>The session will be held in person, in Italian. So if you&rsquo;re interested, j<a href="https://www.meetup.com/it-IT/devromagna/events/291027334/">oin us</a>!</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
