The Best Code is No Code At All https://ldez.github.io/ Recent content on The Best Code is No Code At All Hugo -- gohugo.io en-us Sun, 23 Mar 2025 01:18:13 +0100 Welcome to golangci-lint v2 https://ldez.github.io/blog/2025/03/23/golangci-lint-v2/ Sun, 23 Mar 2025 01:18:13 +0100 https://ldez.github.io/blog/2025/03/23/golangci-lint-v2/ <p>I am thrilled to announce the release of v2!</p> <p>I hope is that these features will enhance your development experience.</p> <p> <a href="https://ldez.github.io/images/amazing-world-golangci-lint-v2.png" data-dimbox data-dimbox-caption=""> <img src="https://ldez.github.io/images/amazing-world-golangci-lint-v2.png"/> </a> </p> exptostd https://ldez.github.io/blog/2024/12/22/exptostd/ Sun, 22 Dec 2024 01:18:13 +0100 https://ldez.github.io/blog/2024/12/22/exptostd/ <p>Detects functions from golang.org/x/exp/ that can be replaced by std functions.</p> Usetesting https://ldez.github.io/blog/2024/11/24/usetesting/ Sun, 24 Nov 2024 01:18:13 +0100 https://ldez.github.io/blog/2024/11/24/usetesting/ <p>Detects when some calls can be replaced by methods from the testing package.</p> How I published links inside the pkg.go.dev documentation of my module https://ldez.github.io/blog/2024/10/26/links-godoc-module/ Sat, 26 Oct 2024 01:18:13 +0100 https://ldez.github.io/blog/2024/10/26/links-godoc-module/ <p>While hunting down a package on <a href="https://pkg.go.dev">https://pkg.go.dev</a>, I stumbled upon a delightful surprise in the &ldquo;Links&rdquo; section: there are custom links!!</p> <p> <a href="https://ldez.github.io/images/pkggodevlinks-package.png" data-dimbox data-dimbox-caption=""> <img src="https://ldez.github.io/images/pkggodevlinks-package.png"/> </a> </p> <p>What is this magic?</p> Distributarepo https://ldez.github.io/blog/2024/07/07/distributarepo/ Sun, 07 Jul 2024 01:18:13 +0100 https://ldez.github.io/blog/2024/07/07/distributarepo/ <p>Helper to get an overview of the forks of a GitHub repository.</p> GHBan https://ldez.github.io/blog/2024/05/12/ghban/ Sun, 12 May 2024 01:18:13 +0100 https://ldez.github.io/blog/2024/05/12/ghban/ <p>To block multiple accounts across multiple organizations.</p> Modupwiz https://ldez.github.io/blog/2024/02/14/modupwiz/ Wed, 14 Feb 2024 01:18:13 +0100 https://ldez.github.io/blog/2024/02/14/modupwiz/ <p>Modules Update Wizard (modupwiz) is a helper to manage dependency updates.</p> Mail-in-a-Box Go Client https://ldez.github.io/blog/2024/02/11/mail-in-a-box-go-client/ Sun, 11 Feb 2024 01:18:13 +0100 https://ldez.github.io/blog/2024/02/11/mail-in-a-box-go-client/ <p>Go library for accessing Mail-in-a-Box API.</p> Nodion DNS Go Client https://ldez.github.io/blog/2023/02/05/nodion-dns-go-client/ Sun, 05 Feb 2023 01:18:13 +0100 https://ldez.github.io/blog/2023/02/05/nodion-dns-go-client/ <p>Go library for accessing Nodion API.</p> Take a Mocktail https://ldez.github.io/blog/2023/01/10/take-a-mocktail/ Tue, 10 Jan 2023 01:18:13 +0100 https://ldez.github.io/blog/2023/01/10/take-a-mocktail/ <p> <a href="https://ldez.github.io/images/mocktail-social-github.png" data-dimbox data-dimbox-caption="Mocktail"> <img alt="Mocktail" src="https://ldez.github.io/images/mocktail-social-github.png"/> </a> </p> <p>Mocktail: Mock Generator for Strongly-Typed Mocks.</p> Mocktail, fruity mocks https://ldez.github.io/blog/2022/06/04/mocktail-fruity-mocks/ Sat, 04 Jun 2022 01:18:13 +0100 https://ldez.github.io/blog/2022/06/04/mocktail-fruity-mocks/ <p>Naive code generator that creates mock implementation using testify.mock.</p> traefik-certs-cleaner https://ldez.github.io/blog/2022/01/23/traefik-certs-cleaner/ Sun, 23 Jan 2022 01:18:13 +0100 https://ldez.github.io/blog/2022/01/23/traefik-certs-cleaner/ <p>A simple helper to clean the Traefik <code>acme.json</code> file by removing and revoking certificates.</p> mime-types as constants https://ldez.github.io/blog/2022/01/01/mime-types-as-constants/ Sat, 01 Jan 2022 01:18:13 +0100 https://ldez.github.io/blog/2022/01/01/mime-types-as-constants/ <p>A Go module that provides mime-types as constants.</p> Freemyip DNS Go Client https://ldez.github.io/blog/2021/07/04/freemyip-dns-go-client/ Sun, 04 Jul 2021 01:18:13 +0100 https://ldez.github.io/blog/2021/07/04/freemyip-dns-go-client/ <p>Go library for accessing the freemyip.com API.</p> Porkbun DNS Go Client https://ldez.github.io/blog/2021/05/01/porkbun-dns-go-client/ Sat, 01 May 2021 01:18:13 +0100 https://ldez.github.io/blog/2021/05/01/porkbun-dns-go-client/ <p>Go library for accessing the Porkdun API.</p> Tagliatelle https://ldez.github.io/blog/2021/04/11/tagliatelle/ Sun, 11 Apr 2021 01:01:13 +0100 https://ldez.github.io/blog/2021/04/11/tagliatelle/ <p>A linter that handles Go struct tags.</p> Libraries Comparison About Word Cases https://ldez.github.io/blog/2021/04/11/libraries-comparison-about-word-cases/ Sun, 11 Apr 2021 01:01:12 +0100 https://ldez.github.io/blog/2021/04/11/libraries-comparison-about-word-cases/ <p>Comparison of Word Cases Manipulations Libraries.</p> GoModDirectives https://ldez.github.io/blog/2021/03/04/gomoddirectives/ Thu, 04 Mar 2021 01:01:13 +0100 https://ldez.github.io/blog/2021/03/04/gomoddirectives/ <p>A linter that handle <code>replace</code>, <code>retract</code>, <code>exclude</code> directives into <code>go.mod</code>.</p> Paerser https://ldez.github.io/blog/2020/08/25/paerser/ Tue, 25 Aug 2020 01:01:13 +0100 https://ldez.github.io/blog/2020/08/25/paerser/ <p>Parses and loads configuration from many sources. CLI flags, YAML, TOML, JSON, and environment variables.</p> SemGo https://ldez.github.io/blog/2020/08/14/semgo/ Fri, 14 Aug 2020 01:01:13 +0100 https://ldez.github.io/blog/2020/08/14/semgo/ <p>Keeps Go version in SemaphoreCI up to date.</p> Lasius Mixtus 🐜 https://ldez.github.io/blog/2020/08/05/lasius-mixtus/ Wed, 05 Aug 2020 01:01:13 +0100 https://ldez.github.io/blog/2020/08/05/lasius-mixtus/ <p>Publish Documentation on a GitHub Repository.</p> deSEC DNS Go Client https://ldez.github.io/blog/2020/05/13/desec-dns-go-client/ Wed, 13 May 2020 01:18:13 +0100 https://ldez.github.io/blog/2020/05/13/desec-dns-go-client/ <p>Go library for accessing the deSEC API.</p> Grignotin https://ldez.github.io/blog/2020/02/29/grignotin/ Sat, 29 Feb 2020 01:01:13 +0100 https://ldez.github.io/blog/2020/02/29/grignotin/ <p>A collection of small helpers around Go proxy, Go meta information, etc.</p> Deptomod https://ldez.github.io/blog/2019/10/09/deptomod/ Wed, 09 Oct 2019 01:01:13 +0100 https://ldez.github.io/blog/2019/10/09/deptomod/ <p>Enhanced migration from dep to go modules.</p> Seihon https://ldez.github.io/blog/2019/04/29/seihon/ Mon, 29 Apr 2019 01:18:13 +0100 https://ldez.github.io/blog/2019/04/29/seihon/ <p>A simple tool to publish multi-arch images on the Docker Hub.</p> Namesilo DNS Go Client https://ldez.github.io/blog/2019/03/20/namesilo-dns-go-client/ Wed, 20 Mar 2019 01:18:13 +0100 https://ldez.github.io/blog/2019/03/20/namesilo-dns-go-client/ <p>Go library for accessing the Namesilo API.</p> GHActions https://ldez.github.io/blog/2019/02/17/ghactions/ Sun, 17 Feb 2019 01:18:13 +0100 https://ldez.github.io/blog/2019/02/17/ghactions/ <p>Create a Github Action in 5 seconds! (in Golang)</p> Mjolnir https://ldez.github.io/blog/2019/02/17/mjolnir/ Sun, 17 Feb 2019 01:18:13 +0100 https://ldez.github.io/blog/2019/02/17/mjolnir/ <p>A GitHub Action to close issues related to a merged pull request.</p> traefik-certs-dumper https://ldez.github.io/blog/2019/02/10/traefik-certs-dumper/ Sun, 10 Feb 2019 01:18:13 +0100 https://ldez.github.io/blog/2019/02/10/traefik-certs-dumper/ <p>Dump ACME data from Traefik to certificates.</p> Aurora DNS Go Client https://ldez.github.io/blog/2019/02/01/aurora-dns-go-client/ Fri, 01 Feb 2019 01:18:13 +0100 https://ldez.github.io/blog/2019/02/01/aurora-dns-go-client/ <p>Go library for accessing the Aurora DNS API.</p> NRDCG - The natural reserve of DNS clients in Go https://ldez.github.io/blog/2019/02/01/nrdcg-the-natural-reserve-of-dns-clients-in-go/ Fri, 01 Feb 2019 01:17:13 +0100 https://ldez.github.io/blog/2019/02/01/nrdcg-the-natural-reserve-of-dns-clients-in-go/ <p>The natural reserve of DNS clients in Go.</p> motoko https://ldez.github.io/blog/2019/01/13/motoko/ Sun, 13 Jan 2019 01:18:13 +0100 https://ldez.github.io/blog/2019/01/13/motoko/ <p>A tool, based on Go modules, to update a dependency to a major version.</p> GTI https://ldez.github.io/blog/2018/12/30/gti/ Sun, 30 Dec 2018 01:18:13 +0100 https://ldez.github.io/blog/2018/12/30/gti/ <p>A port of gti in Go. (because it&rsquo;s fun)</p> listrandom https://ldez.github.io/blog/2018/03/17/listrandom/ Sat, 17 Mar 2018 01:18:13 +0100 https://ldez.github.io/blog/2018/03/17/listrandom/ <p>A simple tool to randomize a list. No backend, only on browser.</p> go-semaphoreci https://ldez.github.io/blog/2018/01/28/go-semaphoreci/ Sun, 28 Jan 2018 01:18:13 +0100 https://ldez.github.io/blog/2018/01/28/go-semaphoreci/ <p>Go library for accessing the Semaphore CI API.</p> Messor Structor 🐜 https://ldez.github.io/blog/2018/01/14/messor-structor/ Sun, 14 Jan 2018 01:18:13 +0100 https://ldez.github.io/blog/2018/01/14/messor-structor/ <p>Manage multiple documentation versions with Mkdocs.</p> Myrmica Gallienii 🐜 https://ldez.github.io/blog/2017/09/10/myrmica-gallienii/ Sun, 10 Sep 2017 01:18:13 +0100 https://ldez.github.io/blog/2017/09/10/myrmica-gallienii/ <p>Keep Forks Synchronized.</p> GHWebHook https://ldez.github.io/blog/2017/08/06/ghwebhook/ Sun, 06 Aug 2017 01:18:13 +0100 https://ldez.github.io/blog/2017/08/06/ghwebhook/ <p>Create a Github WebHook in 5 seconds! (in Golang)</p> Myrmica Aloba 🐜 https://ldez.github.io/blog/2017/07/30/myrmica-aloba/ Sun, 30 Jul 2017 01:18:13 +0100 https://ldez.github.io/blog/2017/07/30/myrmica-aloba/ <p>Add labels and milestone on pull requests and issues.</p> Myrmica Bibikoffi 🐜 https://ldez.github.io/blog/2017/07/23/myrmica-bibikoffi/ Sun, 23 Jul 2017 01:18:13 +0100 https://ldez.github.io/blog/2017/07/23/myrmica-bibikoffi/ <p>Closes stale issues.</p> Myrmica Lobicornis 🐜 https://ldez.github.io/blog/2017/07/23/myrmica-lobicornis/ Sun, 23 Jul 2017 01:18:13 +0100 https://ldez.github.io/blog/2017/07/23/myrmica-lobicornis/ <p>Update and Merge Pull Request.</p> PRM https://ldez.github.io/blog/2017/06/11/prm/ Sun, 11 Jun 2017 01:18:13 +0100 https://ldez.github.io/blog/2017/06/11/prm/ <p>Pull Request Manager for Maintainers.</p> go-git-cmd-wrapper https://ldez.github.io/blog/2017/06/04/go-git-cmd-wrapper/ Sun, 04 Jun 2017 01:18:13 +0100 https://ldez.github.io/blog/2017/06/04/go-git-cmd-wrapper/ <p>A simple wrapper around git command in Go.</p> GCG https://ldez.github.io/blog/2017/05/14/gcg/ Sun, 14 May 2017 01:18:13 +0100 https://ldez.github.io/blog/2017/05/14/gcg/ <p>A GitHub Changelog Generator.</p> Test Driven Learning - Go https://ldez.github.io/blog/2015/12/04/test-driven-learning-go/ Fri, 04 Dec 2015 22:13:46 +0100 https://ldez.github.io/blog/2015/12/04/test-driven-learning-go/ <p>Go est un langage qui buzz beaucoup depuis quelques temps en grande partie à cause de <a href="https://www.docker.com">Docker</a>, j&rsquo;ai donc eut l&rsquo;envie de m&rsquo;initier à ce langage.</p> <p>Je me suis demandé comment commencer : faire des tutoriaux, souvent cela se résume à des copier-coller et finit par une connaissance très partielle.</p> <p>Du coup, je me suis dit pourquoi ne pas essayer de faire le kata FizzBuzz pour apprendre.</p> <p>C&rsquo;est un kata très simple que je connais bien, je l&rsquo;ai fait avec différentes contraintes en Java alors pourquoi ne pas le faire en Go ?</p> <p>C&rsquo;est parti !</p> Kata Print Diamond https://ldez.github.io/blog/2015/08/22/kata-print-diamond/ Sat, 22 Aug 2015 22:22:38 +0200 https://ldez.github.io/blog/2015/08/22/kata-print-diamond/ <p>Ce kata définit par <a href="http://claysnow.co.uk/recycling-tests-in-tdd/">Seb Rose</a> a pour but de montrer une approche visant à recycler les tests afin de ne pas créer de phase tunnel de refactor long et massif.</p> <p>J&rsquo;ai donc respecté l&rsquo;approche TDD pour l&rsquo;émergence du design et fait des &lsquo;<em>baby step</em>&rsquo; en créant des tests pour chacune des étapes afin d&rsquo;avoir une <em>victoire</em> à chaque fois. (Il est très important d&rsquo;avoir rapidement un retour positif pour ce que l&rsquo;on fait)</p> <h2 id="description">Description</h2> <p>Étant donné une lettre, imprimer un diamant en commençant par &ldquo;A&rdquo; avec la lettre fournie pour point le plus large.</p> <p>Par exemple <code>print-diamond ‘C’</code> affiche :</p> <pre tabindex="0"><code> A B B C C B B A </code></pre> Promesse de promesse, promis ? https://ldez.github.io/blog/2015/05/21/promesse-de-promesse/ Thu, 21 May 2015 21:43:19 +0200 https://ldez.github.io/blog/2015/05/21/promesse-de-promesse/ <p>Lors d&rsquo;une conversation avec un collègue de travail (<a href="http://gillespie59.github.io">Emmanuel Demey</a>), une question est venue :</p> <p>Si une promesse prend comme argument de son <code>resolve</code> une promesse, que se passe t&rsquo;il dans le <code>then</code> de la méthode appelante ?</p> <p>Le resultat est une promesse ou une <code>String</code> ?</p> Javascript - Héritage & assign/extend https://ldez.github.io/blog/2015/04/22/javascript-inheritence-assign-extend/ Wed, 22 Apr 2015 02:14:44 +0200 https://ldez.github.io/blog/2015/04/22/javascript-inheritence-assign-extend/ <p>Une petite reflexion autour de l&rsquo;héritage en Javascript ES5.</p> <h2 id="assignextend">Assign/Extend</h2> <h3 id="example-1-1">Example 1-1</h3> <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#75715e">// one </span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#66d9ef">var</span> <span style="color:#a6e22e">one</span> <span style="color:#f92672">=</span> { <span style="color:#a6e22e">val</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#39;A&#39;</span>, <span style="color:#a6e22e">fn</span><span style="color:#f92672">:</span> <span style="color:#66d9ef">function</span>(){ <span style="color:#66d9ef">return</span> <span style="color:#66d9ef">this</span>.<span style="color:#a6e22e">val</span>; } }; </span></span><span style="display:flex;"><span><span style="color:#66d9ef">this</span>.<span style="color:#a6e22e">one</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">one</span>; </span></span><span style="display:flex;"><span> </span></span><span style="display:flex;"><span><span style="color:#75715e">// two </span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#66d9ef">var</span> <span style="color:#a6e22e">two</span> <span style="color:#f92672">=</span> Object.<span style="color:#a6e22e">assign</span>({}, <span style="color:#a6e22e">one</span>); </span></span><span style="display:flex;"><span><span style="color:#66d9ef">this</span>.<span style="color:#a6e22e">two</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">two</span>; </span></span></code></pre></div>