tag:github.com,2008:https://github.com/iamlongalong/bytesizer/releases Release notes from bytesizer 2024-03-12T05:36:48Z tag:github.com,2008:Repository/770690653/v1.0.1 2024-03-12T05:36:48Z v1.0.1 <p>release v1.0.1</p> kuhahalong tag:github.com,2008:Repository/770690653/v1.0.0 2024-03-12T05:27:54Z v1.0.0 <h1>🚀 bytesizer v1.0.0 Release Notes</h1> <p>We're thrilled to roll out bytesizer v1.0.0! 🥳 This first official release packs a nifty set of features for handling and converting byte sizes with ease in Go.</p> <h2>What's New? 🤔</h2> <ul> <li><strong>Units Galore</strong>: Constants for Bytes, KB, MB, etc., at your service.</li> <li><strong>Smart Calc</strong>: Zap! Convert <code>[]byte</code> to <code>ByteSize</code> in an instant.</li> <li><strong>Pretty Print</strong>: Make <code>ByteSize</code> readable with <code>.String()</code> - no more squinting!</li> <li><strong>Transform</strong>: Switch between bytes, KBs, MBs, and more, both as <code>float64</code> and <code>int</code>.</li> <li><strong>Parse Power</strong>: Turn those "10KB" strings into <code>ByteSize</code> values without breaking a sweat.</li> <li><strong>Doc Delight</strong>: Everything's explained! Just plug and play. 📚</li> </ul> <h2>Sneak Peek 🕵️</h2> <p>Here's a byte-sized teaser of bytesizer magic:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// Byte calculating wizardry size := bytesizer.Calc([]byte(&quot;Hello Go&quot;)) // Convert wit to readable charm fmt.Println(size.String()) // &quot;Hello Go&quot; in bytes! // Transform with convenience kilobytes := size.KB()"><pre><span class="pl-c">// Byte calculating wizardry</span> <span class="pl-s1">size</span> <span class="pl-c1">:=</span> <span class="pl-s1">bytesizer</span>.<span class="pl-c1">Calc</span>([]<span class="pl-smi">byte</span>(<span class="pl-s">"Hello Go"</span>)) <span class="pl-c">// Convert wit to readable charm</span> <span class="pl-s1">fmt</span>.<span class="pl-c1">Println</span>(<span class="pl-s1">size</span>.<span class="pl-c1">String</span>()) <span class="pl-c">// "Hello Go" in bytes!</span> <span class="pl-c">// Transform with convenience</span> <span class="pl-s1">kilobytes</span> <span class="pl-c1">:=</span> <span class="pl-s1">size</span>.<span class="pl-c1">KB</span>()</pre></div> <p>Embrace <code>bytesizer</code> for your Go projects and keep byte boredom at bay! Happy coding! 🎉</p> iamlongalong