{"id":706,"date":"2026-10-03T17:00:00","date_gmt":"2026-10-03T11:30:00","guid":{"rendered":"https:\/\/smitabharat.com\/blog\/go-dependencies-go-mod-go-sum\/"},"modified":"2026-11-29T01:29:44","modified_gmt":"2026-11-28T19:59:44","slug":"go-dependencies-go-mod-go-sum","status":"publish","type":"post","link":"https:\/\/smitabharat.com\/blog\/go-dependencies-go-mod-go-sum\/","title":{"rendered":"Go Dependencies Explained: go get, go.mod and go.sum"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Go dependencies are the packages your program borrows from other people, such as a UUID maker or a web router. Go has a built-in system to add, update and lock them, so every build gets the same code. In this post, you will learn <code>go get<\/code>, <code>go.mod<\/code>, <code>go.sum<\/code> and <code>go mod tidy<\/code> with real programs, and then practice with common interview questions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is the fourth post in our Go programs series. You should already know <a href=\"https:\/\/smitabharat.com\/blog\/how-to-run-a-go-program\/\">how to run a Go program<\/a> inside a module folder. If you want the theory of packages first, read our <a href=\"https:\/\/smitabharat.com\/blog\/go-modules-packages-explained\/\">Go modules and packages guide<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What are Go Dependencies?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A dependency is code your project needs but did not write. In Go, dependencies come as modules. A module is a group of packages with a name, like <code>github.com\/google\/uuid<\/code>, and a version, like <code>v1.6.0<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Think of cooking at home. You make the dish, but you buy the flour and the spices from a shop. Your <code>go.mod<\/code> file is the shopping list, and <code>go.sum<\/code> is the receipt that proves you got the exact items you paid for.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Go Dependencies Matter<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Almost every real Go project uses outside code. So managing Go dependencies well is part of daily work.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Same build everywhere:<\/strong> a teammate, a CI server and your laptop all use the same versions.<\/li>\n\n\n<li><strong>Safety:<\/strong> checksums stop anyone from swapping the code behind a version.<\/li>\n\n\n<li><strong>Easy updates:<\/strong> one command moves a package to a newer version.<\/li>\n\n\n<li><strong>Clean code:<\/strong> <code>go mod tidy<\/code> removes packages you no longer import.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">How Go Dependencies Work<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When you import a new package and run <code>go mod tidy<\/code>, the Go dependencies system finds the right version, downloads it, and writes it down. The flow is the same for every package.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-dependencies-go-mod-go-sum-diagram-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-dependencies-go-mod-go-sum-diagram-1-1024x640.png\" alt=\"Go dependencies diagram showing import, go mod tidy, module proxy, go.mod, go.sum and module cache\" class=\"wp-image-701\" srcset=\"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-dependencies-go-mod-go-sum-diagram-1-1024x640.png 1024w, https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-dependencies-go-mod-go-sum-diagram-1-300x188.png 300w, https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-dependencies-go-mod-go-sum-diagram-1-768x480.png 768w, https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-dependencies-go-mod-go-sum-diagram-1-1536x960.png 1536w, https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-dependencies-go-mod-go-sum-diagram-1-2048x1280.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Go reads your imports, downloads modules through the proxy, records them in go.mod and go.sum, and keeps a copy in the module cache.<\/figcaption><\/figure>\n\n\n\n<ol class=\"wp-block-list\">\n<li>You add an <code>import<\/code> line for a package you do not have yet.<\/li>\n\n\n<li>You run <code>go mod tidy<\/code> or <code>go get<\/code>.<\/li>\n\n\n<li>Go asks the module proxy, proxy.golang.org, for the module.<\/li>\n\n\n<li>Next, Go checks the download against the checksum database.<\/li>\n\n\n<li>Finally, Go writes the version in <code>go.mod<\/code>, the checksum in <code>go.sum<\/code>, and saves the code in the module cache.<\/li>\n\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Your First Program with Go Dependencies<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Easy Start: A Program with No Go Dependencies<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Before we add outside code, look at a program that needs none. It only uses the standard library, which comes with Go.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package main\n\nimport (\n    \"fmt\"\n    \"strings\" \/\/ strings is part of the standard library, so no download is needed\n)\n\n\/\/ main turns a word into capital letters and counts its letters\nfunc main() {\n    word := \"gopher\" \/\/ := creates a new variable\n\n    upper := strings.ToUpper(word) \/\/ ToUpper returns a new, upper case copy\n    fmt.Println(upper)\n    fmt.Println(\"Letters:\", len(word)) \/\/ len counts the letters in the word\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>GOPHER\nLetters: 6<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">First, <code>strings.ToUpper<\/code> makes a capital letter copy of the word. Then <code>len<\/code> counts its letters. Because <code>strings<\/code> ships with Go, your <code>go.mod<\/code> stays short, with no <code>require<\/code> line at all.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Add Your First Outside Package<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now let&#8217;s build a small program that uses a public package. We will use <code>rsc.io\/quote<\/code>, the same package from the official Go tutorial. First, create the module.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir quotes\ncd quotes\ngo mod init example.com\/quotes<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Next, write <code>main.go<\/code>. It imports the outside package and prints one of its quotes.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package main\n\nimport (\n    \"fmt\"\n\n    \"rsc.io\/quote\" \/\/ an outside package, so Go must download it\n)\n\n\/\/ main prints one quote from the quote package\nfunc main() {\n    message := quote.Go() \/\/ Go() returns a famous Go saying as a string\n    fmt.Println(message)\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you run it now, Go says the package is missing. So we ask Go to find it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ go mod tidy\ngo: finding module for package rsc.io\/quote\ngo: found rsc.io\/quote in rsc.io\/quote v1.5.2\n\n$ go run .\nDon't communicate by sharing memory, share memory by communicating.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>go mod tidy<\/code> read the import, found the latest version and downloaded it. That is all it takes to add Go dependencies. After that, <code>go run .<\/code> worked on the first try.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Inside the go.mod File<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Open <code>go.mod<\/code> after the command. Go has added the new package and the packages it needs in turn. The <code>go<\/code> line is set by <code>go mod init<\/code>. Since Go 1.26, it writes the release before yours, so Go 1.27 writes <code>go 1.26.0<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>module example.com\/quotes\n\ngo 1.26.0\n\nrequire rsc.io\/quote v1.5.2\n\nrequire (\n    golang.org\/x\/text v0.0.0-20170915032832-14c0d48ead0c \/\/ indirect\n    rsc.io\/sampler v1.3.0 \/\/ indirect\n)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The table below explains each part of the file.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Line<\/th><th>What it means<\/th><\/tr><\/thead><tbody><tr><td>module<\/td><td>The name of your module and its import path<\/td><\/tr><tr><td>go<\/td><td>The lowest Go version this module needs<\/td><\/tr><tr><td>require<\/td><td>A dependency and its exact version<\/td><\/tr><tr><td>\/\/ indirect<\/td><td>Needed by a dependency, not imported by you<\/td><\/tr><tr><td>replace<\/td><td>Use a different copy, such as a local folder<\/td><\/tr><tr><td>exclude<\/td><td>Never use this one version<\/td><\/tr><tr><td>tool<\/td><td>A Go tool this module uses, run with go tool<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">What is go.sum?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For Go dependencies, <code>go.sum<\/code> holds a checksum for every module version your build uses. A checksum is a short fingerprint of the files. If the code behind a version ever changes, the fingerprint no longer matches, and Go stops the build.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rsc.io\/quote v1.5.2 h1:w5fcysjrx7yqtD\/aO+QwRjYZOKnaM9Uh2b40tElTs3Y=\nrsc.io\/quote v1.5.2\/go.mod h1:LzX7hefJvL54yjefDEDHNONDjII0t9xZLPXsUe+TKr0=<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">So always commit both <code>go.mod<\/code> and <code>go.sum<\/code> to Git. Never edit <code>go.sum<\/code> by hand.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">go.mod vs go.sum<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Beginners often mix up these two files, so here is a side-by-side view.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-dependencies-go-mod-go-sum-diagram-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-dependencies-go-mod-go-sum-diagram-2-1024x640.png\" alt=\"Go dependencies comparison of go.mod and go.sum files\" class=\"wp-image-702\" srcset=\"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-dependencies-go-mod-go-sum-diagram-2-1024x640.png 1024w, https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-dependencies-go-mod-go-sum-diagram-2-300x188.png 300w, https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-dependencies-go-mod-go-sum-diagram-2-768x480.png 768w, https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-dependencies-go-mod-go-sum-diagram-2-1536x960.png 1536w, https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-dependencies-go-mod-go-sum-diagram-2-2048x1280.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">go.mod lists which versions you want, and go.sum proves the downloaded code has not changed.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Feature<\/th><th>go.mod<\/th><th>go.sum<\/th><\/tr><\/thead><tbody><tr><td>Purpose<\/td><td>Lists modules and versions<\/td><td>Stores checksums<\/td><\/tr><tr><td>Written by<\/td><td>You and Go<\/td><td>Go only<\/td><\/tr><tr><td>Edit by hand<\/td><td>Sometimes, carefully<\/td><td>Never<\/td><\/tr><tr><td>Commit to Git<\/td><td>Yes<\/td><td>Yes<\/td><\/tr><tr><td>Read by people<\/td><td>Yes, it is short<\/td><td>Rarely<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In short, <code>go.mod<\/code> says what you want, and <code>go.sum<\/code> proves you got it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Managing Go Dependencies with go get<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><code>go get<\/code> adds, upgrades, downgrades and removes Go dependencies. You add <code>@<\/code> and a version to choose exactly what you want.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># add the latest version\ngo get github.com\/google\/uuid@latest\n\n# pick an exact version\ngo get rsc.io\/quote@v1.5.1\n\n# upgrade one package and its own dependencies\ngo get -u github.com\/google\/uuid\n\n# remove a dependency\ngo get github.com\/google\/uuid@none<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a second program that uses the uuid package. It creates a random ID, so your output will be different each time.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package main\n\nimport (\n    \"fmt\"\n\n    \"github.com\/google\/uuid\" \/\/ outside package that makes unique IDs\n)\n\n\/\/ main creates one random ID and prints it with its length\nfunc main() {\n    \/\/ Step 1: make a new random ID\n    id := uuid.New()\n\n    \/\/ Step 2: turn the ID into text like \"7c9e6679-...\"\n    orderID := id.String()\n\n    \/\/ Step 3: print the text and how many characters it has\n    fmt.Println(\"Order ID:\", orderID)\n    fmt.Println(\"Length:\", len(orderID))\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>$ go get github.com\/google\/uuid@latest\ngo: added github.com\/google\/uuid v1.6.0\n\n$ go run .\nOrder ID: 7c9e6679-7425-40de-944b-e07fc1f90ae7\nLength: 36<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The ID changes on every run, but the length is always 36 characters. That makes it a good choice for order numbers and database keys.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Go Dependencies Commands Cheat Sheet<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The table below lists the commands you will use most often to manage Go dependencies.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Command<\/th><th>What it does<\/th><\/tr><\/thead><tbody><tr><td>go mod init name<\/td><td>Creates a new go.mod<\/td><\/tr><tr><td>go mod tidy<\/td><td>Adds missing and removes unused modules<\/td><\/tr><tr><td>go get pkg@version<\/td><td>Adds or changes a dependency<\/td><\/tr><tr><td>go list -m all<\/td><td>Lists every module in the build<\/td><\/tr><tr><td>go list -m -u all<\/td><td>Shows which modules have updates<\/td><\/tr><tr><td>go mod why pkg<\/td><td>Shows why a package is needed<\/td><\/tr><tr><td>go mod graph<\/td><td>Prints the full dependency tree<\/td><\/tr><tr><td>go mod verify<\/td><td>Checks the cache against go.sum<\/td><\/tr><tr><td>go mod vendor<\/td><td>Copies dependencies into a vendor folder<\/td><\/tr><tr><td>go clean -modcache<\/td><td>Deletes the whole module cache<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Major Versions in Go Dependencies<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Go modules use semantic versions, written as <code>vMAJOR.MINOR.PATCH<\/code>. A new patch fixes bugs, and a new minor adds features. A new major version may break old code, so Go treats it as a new import path that ends in <code>\/v2<\/code>, <code>\/v3<\/code> and so on.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Because of this rule, you can even use two major versions in one program. The example below imports v1 and v3 of the same module.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package main\n\nimport (\n    \"fmt\"\n\n    \"rsc.io\/quote\"            \/\/ version 1 of the module\n    quoteV3 \"rsc.io\/quote\/v3\" \/\/ version 3; quoteV3 is the name we use for it in this file\n)\n\n\/\/ main prints the same saying from two major versions of one module\nfunc main() {\n    fmt.Println(quote.Go())     \/\/ from v1\n    fmt.Println(quoteV3.GoV3()) \/\/ from v3\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Don't communicate by sharing memory, share memory by communicating.\nDon't communicate by sharing memory, share memory by communicating.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We gave the v3 package the name <code>quoteV3<\/code>, so the two imports do not clash. This is how big projects move to a new major version step by step.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Easy Example: Give an Import a Short Name<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>quoteV3<\/code> trick works for any import, even standard ones. This small program renames <code>strings<\/code> to <code>text<\/code>, so you can try the idea without any Go dependencies.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package main\n\nimport (\n    \"fmt\"\n    text \"strings\" \/\/ text is our own short name for the strings package\n)\n\n\/\/ main uses the renamed package to join and repeat words\nfunc main() {\n    words := []string{\"go\", \"is\", \"fun\"} \/\/ a slice, which is a list of strings\n\n    sentence := text.Join(words, \" \") \/\/ Join puts a space between the words\n    fmt.Println(sentence)\n\n    line := text.Repeat(\"-\", 10) \/\/ Repeat makes ten dashes\n    fmt.Println(line)\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>go is fun\n----------<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The name before the import path becomes the name you type in the code. So <code>text.Join<\/code> is the same function as <code>strings.Join<\/code>. Use this only when two imports clash, because the normal name is easier to read.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Local Changes, Private Code and Tools<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Sometimes you need to change one of your Go dependencies, or you work on two modules at once. A <code>replace<\/code> line points Go to a folder on your disk instead of the internet.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>replace example.com\/greet =&gt; ..\/greet<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For private company code, set GOPRIVATE, so Go skips the public proxy for those paths. For example, <code>go env -w GOPRIVATE=github.com\/my-company\/*<\/code> keeps private module names off the public servers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Since Go 1.24, <code>go.mod<\/code> can also track tools. Run <code>go get -tool golang.org\/x\/tools\/cmd\/stringer<\/code>, and then run it with <code>go tool stringer<\/code>. As a result, every teammate uses the same tool version.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common Mistakes with Go Dependencies<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Not committing go.sum:<\/strong> other machines then fail with a &#8220;missing go.sum entry&#8221; error.<\/li>\n\n\n<li><strong>Editing go.sum by hand:<\/strong> let Go manage it, and run <code>go mod tidy<\/code> if it looks wrong.<\/li>\n\n\n<li><strong>Forgetting \/v2 in the import:<\/strong> a v2 module needs the <code>\/v2<\/code> path, or Go keeps using v1.<\/li>\n\n\n<li><strong>Leaving a local replace line:<\/strong> a <code>replace<\/code> to <code>..\/greet<\/code> breaks the build on other machines.<\/li>\n\n\n<li><strong>Skipping go mod tidy:<\/strong> unused modules stay in <code>go.mod<\/code> and slow down reviews.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Best Practices for Go Dependencies<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Run go mod tidy before every commit<\/strong>, so <code>go.mod<\/code> matches your imports.<\/li>\n\n\n<li><strong>Pick packages with care<\/strong>, because each one adds code you must trust and update.<\/li>\n\n\n<li><strong>Update on purpose<\/strong>, with <code>go list -m -u all<\/code> and one upgrade at a time.<\/li>\n\n\n<li><strong>Prefer the standard library<\/strong> when it already does the job.<\/li>\n\n\n<li><strong>Use govulncheck<\/strong> to find known security bugs in the versions you use.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Go Dependencies Interview Questions and Answers<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">These are the dependency and module questions that come up most in Go interviews. Several include a program or command output, so you can try them yourself.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Go Dependencies Basics<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q1. What is a Go module?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A module is a group of Go packages that are versioned together. It has a <code>go.mod<\/code> file at its root that names the module and lists its dependencies.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q2. What is the difference between a package and a module?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A package is one folder of <code>.go<\/code> files with the same package name. A module is a set of packages released together under one version. So one module can hold many packages.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q3. What does go mod init do?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It creates a new <code>go.mod<\/code> file with the module path you give it, plus a <code>go<\/code> version line. For example, <code>go mod init example.com\/quotes<\/code> starts a new module.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q4. What does go mod tidy do?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It reads every import in your code. Then it adds missing modules, removes unused ones and updates <code>go.sum<\/code>. Run it whenever you add or remove imports.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q5. What is the purpose of go.sum?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It stores checksums for each module version. Go compares downloads with these checksums, so nobody can change the code behind a version without the build failing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q6. What does \/\/ indirect mean in go.mod?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It marks a module that your code does not import directly. One of your dependencies needs it instead. Go still records it so the build stays the same everywhere.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Version Questions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q7. How does Go pick a version when two packages need different ones?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Go uses Minimal Version Selection. If one package needs v1.2.0 and another needs v1.4.0, Go picks v1.4.0. It chooses the lowest version that meets every requirement, not the newest one on the internet.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q8. How do you upgrade all dependencies?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run <code>go get -u .\/...<\/code> to move direct and indirect modules to newer minor or patch versions. Then run <code>go mod tidy<\/code> and your tests. For only patch updates, use <code>go get -u=patch .\/...<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q9. How do you remove a dependency?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Delete the imports from your code, then run <code>go mod tidy<\/code>. You can also run <code>go get example.com\/pkg@none<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q10. Why does a v2 module need \/v2 in its import path?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A major version can break old code. So Go treats v2 as a different module with its own path. This lets old and new versions live in one build without conflict.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q11. What is a pseudo-version?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is a version made from a commit when no tag exists, such as <code>v0.0.0-20170915032832-14c0d48ead0c<\/code>. It holds a time stamp and the commit hash.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Program and Command Output Questions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q12. What does this program print?<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package main\n\nimport (\n    \"fmt\"\n\n    \"rsc.io\/quote\"\n)\n\n\/\/ main checks that the quote is not empty\nfunc main() {\n    message := quote.Go()\n    fmt.Println(len(message) &gt; 0) \/\/ &gt; gives true or false\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>true<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>quote.Go()<\/code> returns a non-empty string, so the comparison is <code>true<\/code>. However, the program only builds after <code>go mod tidy<\/code> adds <code>rsc.io\/quote<\/code> to <code>go.mod<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q13. What happens if you build without running go mod tidy first?<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>main.go:6:5: no required module provides package rsc.io\/quote; to add it:\n    go get rsc.io\/quote<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Go refuses to download new modules during a normal build. It tells you the exact command to run, which keeps builds predictable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q14. What does go mod verify print when all is well?<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>all modules verified<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">It checks the code in your module cache against <code>go.sum<\/code>. If someone changed a file in the cache, it reports which module failed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q15. How do you see why a package is in your build?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run <code>go mod why<\/code> with the package path. For example, <code>go mod why golang.org\/x\/text\/language<\/code> prints the import chain from your code to that package.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Proxy, Vendor and Workspace Questions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q16. What is GOPROXY?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is the list of servers Go uses to download modules. The default is <code>https:\/\/proxy.golang.org,direct<\/code>, which means &#8220;try the proxy, then the source repo&#8221;. Companies often run their own proxy.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q17. What is GOSUMDB?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is the checksum database that Go checks the first time it sees a module version. The default is sum.golang.org. It makes sure everyone gets the same code for the same version.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q18. What is GOPRIVATE used for?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It lists module paths that are private, such as <code>github.com\/my-company\/*<\/code>. For these paths, Go skips the public proxy and checksum database and goes straight to your repo.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q19. What is vendoring?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>go mod vendor<\/code> copies all dependencies into a <code>vendor<\/code> folder in your project. Then builds use that folder, so they work without network access. Some teams use it for strict offline builds.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q20. What is the replace directive used for?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It tells Go to use a different source for a module, such as a local folder or a fork. It is handy while you fix a bug in a dependency. Remove it before you release.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q21. What is a Go workspace?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A workspace lets you work on many modules at once. You create it with <code>go work init<\/code> and add folders with <code>go work use<\/code>. The <code>go.work<\/code> file replaces most local <code>replace<\/code> lines during development.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q22. Where are downloaded modules stored?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">They live in the module cache, by default <code>$GOPATH\/pkg\/mod<\/code>. You can print it with <code>go env GOMODCACHE<\/code> and clear it with <code>go clean -modcache<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q23. How do you track a tool like stringer in go.mod?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Since Go 1.24, run <code>go get -tool golang.org\/x\/tools\/cmd\/stringer<\/code>. Go adds a <code>tool<\/code> line to <code>go.mod<\/code>, and <code>go tool stringer<\/code> runs that exact version.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Practice Task<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Create a new module and use <code>github.com\/google\/uuid<\/code> to print five order IDs in a loop. Then remove the package with <code>go get github.com\/google\/uuid@none<\/code> and see what <code>go build<\/code> says. Hint: run <code>go mod tidy<\/code> after you add the import.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Official Resources<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/go.dev\/doc\/modules\/managing-dependencies\">Managing dependencies<\/a><\/li>\n\n\n<li><a href=\"https:\/\/go.dev\/doc\/modules\/gomod-ref\">go.mod file reference<\/a><\/li>\n\n\n<li><a href=\"https:\/\/go.dev\/ref\/mod\">Go Modules Reference<\/a><\/li>\n\n\n<li><a href=\"https:\/\/go.dev\/doc\/tutorial\/getting-started\">Tutorial: Get started with Go<\/a><\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Quick Recap<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go dependencies are outside modules your code imports, each with a fixed version.<\/li>\n\n\n<li><code>go.mod<\/code> lists what you need, and <code>go.sum<\/code> stores checksums that prove it.<\/li>\n\n\n<li><code>go mod tidy<\/code> adds missing modules and removes unused ones.<\/li>\n\n\n<li><code>go get pkg@version<\/code> adds, upgrades, downgrades or removes a module.<\/li>\n\n\n<li>Major versions from v2 onward need a <code>\/v2<\/code> style import path.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">What&#8217;s Next?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">That completes the setup level of our Go programs series. Coming soon: Go Hello World and print programs, where we start writing real programs with output. Until then, test yourself with the <a href=\"https:\/\/smitabharat.com\/blog\/go-modules-interview-questions-part-10\/\">Go modules interview questions<\/a> or browse the <a href=\"https:\/\/smitabharat.com\/blog\/go-interview-questions-hub\/\">Go interview questions hub<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Go dependencies are the packages your program borrows from other people, such as a UUID maker or a web router. Go has a built-in&hellip;<\/p>\n","protected":false},"author":1,"featured_media":700,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_swapz_level":"","_swapz_series_part":0,"_swapz_hide_toc":false,"_swapz_hide_featured":false,"_swapz_description":"","footnotes":""},"categories":[106],"tags":[96,11,35,104,21],"swapz_series":[],"class_list":["post-706","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-go-programs","tag-beginner","tag-go-lang","tag-go-modules","tag-go-programs","tag-golang-basics"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Go Dependencies: go get, go.mod and go.sum<\/title>\n<meta name=\"description\" content=\"Go dependencies explained with go get, go.mod, go.sum and go mod tidy, plus real programs, outputs and interview questions with answers.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/smitabharat.com\/blog\/go-dependencies-go-mod-go-sum\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Go Dependencies: go get, go.mod and go.sum\" \/>\n<meta property=\"og:description\" content=\"Go dependencies explained with go get, go.mod, go.sum and go mod tidy, plus real programs, outputs and interview questions with answers.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/smitabharat.com\/blog\/go-dependencies-go-mod-go-sum\/\" \/>\n<meta property=\"og:site_name\" content=\"Smita Bharat - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-03T11:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-28T19:59:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-dependencies-go-mod-go-sum-featured.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2400\" \/>\n\t<meta property=\"og:image:height\" content=\"1260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Smita\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Smita\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"15 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-dependencies-go-mod-go-sum\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-dependencies-go-mod-go-sum\\\/\"},\"author\":{\"name\":\"Smita\",\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/#\\\/schema\\\/person\\\/27a1b1067d396703215c54acedbfd339\"},\"headline\":\"Go Dependencies Explained: go get, go.mod and go.sum\",\"datePublished\":\"2026-10-03T11:30:00+00:00\",\"dateModified\":\"2026-11-28T19:59:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-dependencies-go-mod-go-sum\\\/\"},\"wordCount\":2275,\"publisher\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/#\\\/schema\\\/person\\\/27a1b1067d396703215c54acedbfd339\"},\"image\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-dependencies-go-mod-go-sum\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/go-dependencies-go-mod-go-sum-featured.png\",\"keywords\":[\"Beginner\",\"Go Lang\",\"Go Modules\",\"Go Programs\",\"Golang Basics\"],\"articleSection\":[\"Go Programs\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-dependencies-go-mod-go-sum\\\/\",\"url\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-dependencies-go-mod-go-sum\\\/\",\"name\":\"Go Dependencies: go get, go.mod and go.sum\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-dependencies-go-mod-go-sum\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-dependencies-go-mod-go-sum\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/go-dependencies-go-mod-go-sum-featured.png\",\"datePublished\":\"2026-10-03T11:30:00+00:00\",\"dateModified\":\"2026-11-28T19:59:44+00:00\",\"description\":\"Go dependencies explained with go get, go.mod, go.sum and go mod tidy, plus real programs, outputs and interview questions with answers.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-dependencies-go-mod-go-sum\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-dependencies-go-mod-go-sum\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-dependencies-go-mod-go-sum\\\/#primaryimage\",\"url\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/go-dependencies-go-mod-go-sum-featured.png\",\"contentUrl\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/go-dependencies-go-mod-go-sum-featured.png\",\"width\":2400,\"height\":1260,\"caption\":\"Go Dependencies featured image: go mod tidy and go get in a terminal\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/go-dependencies-go-mod-go-sum\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Go Dependencies Explained: go get, go.mod and go.sum\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/\",\"name\":\"Smita Bharat Blog\",\"description\":\"Golang &amp; Backend Development Tutorials and Interview Questions\",\"publisher\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/#\\\/schema\\\/person\\\/27a1b1067d396703215c54acedbfd339\"},\"alternateName\":\"Smita Bharat\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/#\\\/schema\\\/person\\\/27a1b1067d396703215c54acedbfd339\",\"name\":\"Smita\",\"logo\":{\"@id\":\"https:\\\/\\\/smitabharat.com\\\/blog\\\/#\\\/schema\\\/person\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/smitabharat.com\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Go Dependencies: go get, go.mod and go.sum","description":"Go dependencies explained with go get, go.mod, go.sum and go mod tidy, plus real programs, outputs and interview questions with answers.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/smitabharat.com\/blog\/go-dependencies-go-mod-go-sum\/","og_locale":"en_US","og_type":"article","og_title":"Go Dependencies: go get, go.mod and go.sum","og_description":"Go dependencies explained with go get, go.mod, go.sum and go mod tidy, plus real programs, outputs and interview questions with answers.","og_url":"https:\/\/smitabharat.com\/blog\/go-dependencies-go-mod-go-sum\/","og_site_name":"Smita Bharat - Blog","article_published_time":"2026-10-03T11:30:00+00:00","article_modified_time":"2026-11-28T19:59:44+00:00","og_image":[{"width":2400,"height":1260,"url":"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-dependencies-go-mod-go-sum-featured.png","type":"image\/png"}],"author":"Smita","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Smita","Est. reading time":"15 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/smitabharat.com\/blog\/go-dependencies-go-mod-go-sum\/#article","isPartOf":{"@id":"https:\/\/smitabharat.com\/blog\/go-dependencies-go-mod-go-sum\/"},"author":{"name":"Smita","@id":"https:\/\/smitabharat.com\/blog\/#\/schema\/person\/27a1b1067d396703215c54acedbfd339"},"headline":"Go Dependencies Explained: go get, go.mod and go.sum","datePublished":"2026-10-03T11:30:00+00:00","dateModified":"2026-11-28T19:59:44+00:00","mainEntityOfPage":{"@id":"https:\/\/smitabharat.com\/blog\/go-dependencies-go-mod-go-sum\/"},"wordCount":2275,"publisher":{"@id":"https:\/\/smitabharat.com\/blog\/#\/schema\/person\/27a1b1067d396703215c54acedbfd339"},"image":{"@id":"https:\/\/smitabharat.com\/blog\/go-dependencies-go-mod-go-sum\/#primaryimage"},"thumbnailUrl":"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-dependencies-go-mod-go-sum-featured.png","keywords":["Beginner","Go Lang","Go Modules","Go Programs","Golang Basics"],"articleSection":["Go Programs"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/smitabharat.com\/blog\/go-dependencies-go-mod-go-sum\/","url":"https:\/\/smitabharat.com\/blog\/go-dependencies-go-mod-go-sum\/","name":"Go Dependencies: go get, go.mod and go.sum","isPartOf":{"@id":"https:\/\/smitabharat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/smitabharat.com\/blog\/go-dependencies-go-mod-go-sum\/#primaryimage"},"image":{"@id":"https:\/\/smitabharat.com\/blog\/go-dependencies-go-mod-go-sum\/#primaryimage"},"thumbnailUrl":"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-dependencies-go-mod-go-sum-featured.png","datePublished":"2026-10-03T11:30:00+00:00","dateModified":"2026-11-28T19:59:44+00:00","description":"Go dependencies explained with go get, go.mod, go.sum and go mod tidy, plus real programs, outputs and interview questions with answers.","breadcrumb":{"@id":"https:\/\/smitabharat.com\/blog\/go-dependencies-go-mod-go-sum\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/smitabharat.com\/blog\/go-dependencies-go-mod-go-sum\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/smitabharat.com\/blog\/go-dependencies-go-mod-go-sum\/#primaryimage","url":"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-dependencies-go-mod-go-sum-featured.png","contentUrl":"https:\/\/smitabharat.com\/blog\/wp-content\/uploads\/2026\/10\/go-dependencies-go-mod-go-sum-featured.png","width":2400,"height":1260,"caption":"Go Dependencies featured image: go mod tidy and go get in a terminal"},{"@type":"BreadcrumbList","@id":"https:\/\/smitabharat.com\/blog\/go-dependencies-go-mod-go-sum\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/smitabharat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Go Dependencies Explained: go get, go.mod and go.sum"}]},{"@type":"WebSite","@id":"https:\/\/smitabharat.com\/blog\/#website","url":"https:\/\/smitabharat.com\/blog\/","name":"Smita Bharat Blog","description":"Golang &amp; Backend Development Tutorials and Interview Questions","publisher":{"@id":"https:\/\/smitabharat.com\/blog\/#\/schema\/person\/27a1b1067d396703215c54acedbfd339"},"alternateName":"Smita Bharat","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/smitabharat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/smitabharat.com\/blog\/#\/schema\/person\/27a1b1067d396703215c54acedbfd339","name":"Smita","logo":{"@id":"https:\/\/smitabharat.com\/blog\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/smitabharat.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/posts\/706","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/comments?post=706"}],"version-history":[{"count":2,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/posts\/706\/revisions"}],"predecessor-version":[{"id":868,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/posts\/706\/revisions\/868"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/media\/700"}],"wp:attachment":[{"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/media?parent=706"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/categories?post=706"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/tags?post=706"},{"taxonomy":"swapz_series","embeddable":true,"href":"https:\/\/smitabharat.com\/blog\/wp-json\/wp\/v2\/swapz_series?post=706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}