<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Astra on Random Ramblings</title><link>https://blog.foundev.pro/tags/astra.html</link><description>Recent content in Astra on Random Ramblings</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 04 Mar 2021 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.foundev.pro/tags/astra/index.xml" rel="self" type="application/rss+xml"/><item><title>Why I Don't Cobra</title><link>https://blog.foundev.pro/2021/03/04/why-I-dont-cobra.html</link><pubDate>Thu, 04 Mar 2021 00:00:00 +0000</pubDate><guid>https://blog.foundev.pro/2021/03/04/why-I-dont-cobra.html</guid><description>&lt;h1&gt;Why I Don't Cobra&lt;/h1&gt;&#10;&lt;p&gt;So I just implemented this &lt;a href="https://github.com/rsds143/astra-cli"&gt;DataStax Astra CLI&lt;/a&gt; interface and it has gotten some attention where I work. One of the developers&#10;who had worked on a similar tool had suggested I use cobra to build a command line interface.&lt;/p&gt;&#10;&lt;h2 id="code-size"&gt;Code size&lt;/h2&gt;&#10;&lt;p&gt;I explained to him that I actually had a lot of experience with &lt;a href="https://github.com/spf13/cobra"&gt;Cobra&lt;/a&gt; and that I thought it was an&#10;excellent library with lots of great support for nested commands, it also &lt;a href="https://github.com/spf13/cobra/blob/master/go.sum"&gt;had lots of transitive dependencies&lt;/a&gt; (313 lines in the go.sum at the time of this post),&#10;and I&amp;rsquo;ve discovered that it actually can bloat the size of the executable quite a bit. Therefore I had elected to&#10;use the standard library to build my command line flags. Admittedly, I&amp;rsquo;ve had to do a lot more work to actually build&#10;my commandline interface, I did kept the executable size to under 4 mb for all platforms.&lt;/p&gt;</description></item></channel></rss>