<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: LogicCo</title>
    <description>The latest articles on DEV Community by LogicCo (@logicco).</description>
    <link>https://dev.to/logicco</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3850047%2F142b69d5-83f4-45c0-8ede-f5a7d32f528d.png</url>
      <title>DEV Community: LogicCo</title>
      <link>https://dev.to/logicco</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/logicco"/>
    <language>en</language>
    <item>
      <title>What Is The go.sum File Really Used For In Your Go Projects?</title>
      <dc:creator>LogicCo</dc:creator>
      <pubDate>Sun, 03 May 2026 01:07:37 +0000</pubDate>
      <link>https://dev.to/logicco/what-is-the-gosum-file-really-used-for-in-your-go-projects-1gb7</link>
      <guid>https://dev.to/logicco/what-is-the-gosum-file-really-used-for-in-your-go-projects-1gb7</guid>
      <description>&lt;p&gt;You have probably seen a file named &lt;strong&gt;“go.sum”&lt;/strong&gt; in almost every Go project you have worked on. You may have even seen it change every time you run &lt;strong&gt;“go mod tidy”&lt;/strong&gt;. But do you actually know what it does? It is one of those files that works silently in the background, and some developers never stop to think about it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;“go.sum”&lt;/strong&gt; file is one of those files you never really interact with directly, but it is almost always there. If you have ever opened it, its content looks something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0x97wtgyk5b0ph2lgkrm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0x97wtgyk5b0ph2lgkrm.png" alt="go.sum file" width="800" height="303"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each line follows the same pattern: &lt;strong&gt;a package name, a version, and a hash&lt;/strong&gt;. That structure alone gives you a strong hint about what this file is really doing.&lt;/p&gt;

&lt;p&gt;One thing worth noting before going further: &lt;strong&gt;“go.sum”&lt;/strong&gt; is not present in every Go project. It only appears in projects that rely on external dependencies, meaning packages outside of the standard library.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Gets Created
&lt;/h2&gt;

&lt;p&gt;This file is created or updated automatically whenever you run a go command that needs to resolve external dependencies, such as &lt;strong&gt;“go mod tidy”&lt;/strong&gt;, &lt;strong&gt;“go get”&lt;/strong&gt;, or &lt;strong&gt;“go build”&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If dependencies are being downloaded for the first time, the file is created from scratch. If dependencies are updated, the file is updated accordingly.&lt;/p&gt;

&lt;p&gt;One thing to keep in mind: removed dependencies are &lt;strong&gt;not&lt;/strong&gt; automatically cleaned from this file. You need to run &lt;strong&gt;“go mod tidy”&lt;/strong&gt; explicitly to remove unused entries.&lt;/p&gt;

&lt;h2&gt;
  
  
  So, What Is It Actually Used For?
&lt;/h2&gt;

&lt;p&gt;Think of &lt;strong&gt;“go.sum”&lt;/strong&gt; as a &lt;strong&gt;fingerprint registry&lt;/strong&gt; for your dependencies.&lt;/p&gt;

&lt;p&gt;When Go downloads an external dependency, it computes a cryptographic hash of that code and compares it against the known hash stored in &lt;strong&gt;“go.sum”&lt;/strong&gt;. If they match, everything is fine. If they don't, Go knows something has changed.&lt;/p&gt;

&lt;p&gt;This process is called an &lt;strong&gt;integrity check&lt;/strong&gt;, and &lt;strong&gt;“go.sum”&lt;/strong&gt; is the file that makes it possible by storing those known hashes.&lt;/p&gt;

&lt;p&gt;But what happens when &lt;strong&gt;“go.sum”&lt;/strong&gt; does not exist yet and there are no known hashes? In that case, Go reaches out to its own &lt;strong&gt;checksum database&lt;/strong&gt; to retrieve them, ensuring the integrity check always happens. This behavior can be configured through the &lt;strong&gt;GONOSUMDB&lt;/strong&gt;, &lt;strong&gt;GOPRIVATE&lt;/strong&gt;, and &lt;strong&gt;GOSUMDB&lt;/strong&gt; environment variables, which are useful when working with private modules that should not be verified against the public database.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;“go.sum”&lt;/strong&gt; file plays a quiet but critical role in your Go projects. Without it, you would have no reliable way to tell whether a dependency has changed since you first downloaded it, forcing you to re-download everything just to be safe. That would slow down builds and introduce unnecessary risk.&lt;/p&gt;

&lt;p&gt;Now you know it is not just noise, it is your project's first line of defense against dependency tampering.&lt;/p&gt;

&lt;p&gt;Want to go deeper? Here are the official resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://pkg.go.dev/cmd/go#hdr-Module_authentication_using_go_sum" rel="noopener noreferrer"&gt;Module authentication using go.sum&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://go.dev/ref/mod" rel="noopener noreferrer"&gt;Go Modules Reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://go.dev/ref/mod#authenticating" rel="noopener noreferrer"&gt;Authenticating modules&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sum.golang.org/" rel="noopener noreferrer"&gt;sum.golang.org&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>programming</category>
      <category>code</category>
      <category>go</category>
      <category>devdiscuss</category>
    </item>
    <item>
      <title>The Invisible Layer Protecting Your Go Dependencies</title>
      <dc:creator>LogicCo</dc:creator>
      <pubDate>Sun, 26 Apr 2026 03:39:30 +0000</pubDate>
      <link>https://dev.to/logicco/the-invisible-layer-protecting-your-go-dependencies-4n9m</link>
      <guid>https://dev.to/logicco/the-invisible-layer-protecting-your-go-dependencies-4n9m</guid>
      <description>&lt;p&gt;Before starting, I want to be clear: this is not a deep dive into the Golang Proxy, but an introductory explanation so you know about it and its existence, just like I did after using Go for a couple of months without even knowing it was there.&lt;/p&gt;

&lt;h2&gt;
  
  
  It’s Been There
&lt;/h2&gt;

&lt;p&gt;Every time you download a dependency in a Go project, either directly with &lt;strong&gt;go get&lt;/strong&gt; or indirectly with &lt;strong&gt;go mod tidy&lt;/strong&gt;, Go silently uses something called the &lt;strong&gt;Golang Proxy&lt;/strong&gt;. It's an invisible and default process, easy to miss if nobody tells you about it. But, like most things in Go, it can be adapted and configured.&lt;/p&gt;

&lt;p&gt;The Golang Proxy stores a mirrored version of the dependencies you download. So, you rarely interact directly with the original source where that dependency actually lives. This only applies to public, "registered" Go packages. The proxy doesn't store every piece of Go code published on platforms like GitHub, as that would be counterproductive for both the language and developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does It Exist
&lt;/h2&gt;

&lt;p&gt;You might be wondering: &lt;em&gt;why use a proxy at all? Why not just fetch from the original source?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;There's a simple but powerful answer: &lt;strong&gt;to ensure resilience and stability across the Go ecosystem.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Picture this scenario:&lt;br&gt;
You're building a Go project that generates hashes used in almost every part of your application, so, your entire project depends on it. You rely on an external package for this. One day, while cleaning up your device, you accidentally delete it. No big deal, you think, you'll just re-download it. But before you or your teammates can do that, the original source goes down, maybe the repository was deleted, maybe the author took it down. Suddenly, nobody can download it, and your project becomes completely unusable.&lt;/p&gt;

&lt;p&gt;That's exactly the problem the Golang Proxy was built to solve: &lt;strong&gt;ensuring that dependencies remain available to any Go project, regardless of what happens to their original source.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How Does It Work
&lt;/h2&gt;

&lt;p&gt;When you download a dependency, Go requests it from the Golang Proxy by default, this is the standard behavior for publicly available packages. Go even uses a dedicated communication protocol for this called the &lt;strong&gt;proxy protocol&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This behavior is controlled by the &lt;strong&gt;GOPROXY&lt;/strong&gt; environment variable, which you can configure based on your needs. By default, it points to &lt;strong&gt;&lt;a href="https://proxy.golang.org" rel="noopener noreferrer"&gt;https://proxy.golang.org&lt;/a&gt;&lt;/strong&gt;, followed by &lt;strong&gt;direct&lt;/strong&gt; as a fallback. This means that, if the proxy can't serve the dependency (due to server errors, legal situations, or other reasons), Go will attempt to fetch it directly from the original source.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;The Golang Proxy is one of those components that works quietly in the background, keeping the ecosystem healthy without asking for your attention. You'll rarely interact with it consciously, but knowing it exists helps you understand what's happening under the hood every time you download a Go package.&lt;/p&gt;

&lt;p&gt;If you want to go deeper on this topic, here are some official resources worth reading:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://proxy.golang.org/" rel="noopener noreferrer"&gt;Go Proxy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://proxy.golang.org/privacy" rel="noopener noreferrer"&gt;Go Proxy Privacy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://go.dev/ref/mod" rel="noopener noreferrer"&gt;Go Modules Reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://go.dev/ref/mod#goproxy-protocol" rel="noopener noreferrer"&gt;GOPROXY Protocol&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>programming</category>
      <category>code</category>
      <category>go</category>
      <category>proxy</category>
    </item>
    <item>
      <title>Why Would Go Do This In Its Documentation?</title>
      <dc:creator>LogicCo</dc:creator>
      <pubDate>Sat, 18 Apr 2026 23:17:47 +0000</pubDate>
      <link>https://dev.to/logicco/why-would-go-do-this-in-its-documentation-45e</link>
      <guid>https://dev.to/logicco/why-would-go-do-this-in-its-documentation-45e</guid>
      <description>&lt;p&gt;Before diving in, let me be clear: this is not a critique nor a complaint about Go. It’s simply an observation that led me to an interesting question. &lt;/p&gt;

&lt;p&gt;Go is my everyday work tool, and I enjoy using it like no other programming language.&lt;/p&gt;

&lt;h2&gt;
  
  
  The go command
&lt;/h2&gt;

&lt;p&gt;If there’s one tool every Go developer uses constantly, it’s the &lt;strong&gt;go&lt;/strong&gt; command. It’s the direct gateway to every aspect of a Go project, from module management to environment configuration.&lt;/p&gt;

&lt;p&gt;Because of its importance, every serious Go developer should read the &lt;a href="https://pkg.go.dev/cmd/go" rel="noopener noreferrer"&gt;go command documentation&lt;/a&gt;, or at least be aware of its existence.&lt;/p&gt;

&lt;p&gt;This documentation artifact covers all available commands, along with related topics. For example, the &lt;strong&gt;go test&lt;/strong&gt; command  and the &lt;strong&gt;Build and test caching&lt;/strong&gt; topic, since they’re closely related. Everything feels intentional, structured, and very &lt;em&gt;Go-like.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which is exactly why something stood out.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Observation
&lt;/h2&gt;

&lt;p&gt;If you look carefully at the full list of commands, you’ll notice something unusual, something that feels almost out of place in a language known for its simplicity and consistency:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The alphabetical order breaks at the “work” command.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5fdr4d6y4p9840709z4w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5fdr4d6y4p9840709z4w.png" alt="list of commands" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And it’s not just in the list. As you continue reading through the documentation, the order stays broken, until after the &lt;strong&gt;Workspace maintenance&lt;/strong&gt; topic, where it quietly returns to normal.&lt;/p&gt;

&lt;p&gt;That makes the &lt;strong&gt;work&lt;/strong&gt; command the only command sitting in the wrong alphabetical position throughout the entire documentation.&lt;/p&gt;

&lt;p&gt;Naturally, you might think: &lt;em&gt;“Maybe the Workspace concept is a prerequisite for understanding the commands that follow?”&lt;/em&gt; It’s a reasonable guess. But when you go through those commands with that idea in mind, the connection simply isn’t there. The following commands don’t relate to workspaces, and understanding them doesn’t require any knowledge of the concept.&lt;/p&gt;

&lt;p&gt;So the question stands: &lt;strong&gt;Why would Go do this?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Any Ideas?
&lt;/h2&gt;

&lt;p&gt;No “official” answer has been found, at least not by me. But here are a few reasonable theories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The “late addition” theory:&lt;/strong&gt; A previous version of the documentation didn’t include the commands that come after &lt;strong&gt;work&lt;/strong&gt;. The alphabetical order was correct back then, and when new commands were added later, no one bothered to reorder everything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The “not worth fixing” theory:&lt;/strong&gt; It’s a known inconsistency, but correcting it would require changes across many interconnected parts of the documentation and other artifacts. Not worth the effort for something that doesn’t affect functionality.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The “Easter egg” theory:&lt;/strong&gt; It’s a subtle joke, intentionally left there to “reward” the most observant and detail-oriented developers. Why not?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;I haven’t done extensive research on this, and I don’t plan to. But I find it to be a genuinely fun discussion topic, especially in a language that prides itself on clarity and consistency.&lt;/p&gt;

&lt;p&gt;If you know the “official” answer, or have a theory of your own, drop it in the comments. I’d like to read it.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>go</category>
      <category>code</category>
      <category>documentation</category>
    </item>
  </channel>
</rss>
