[{"data":1,"prerenderedAt":1703},["ShallowReactive",2],{"navigation_docs":3,"-getting-started-modules-and-dependencies":377,"-getting-started-modules-and-dependencies-surround":1698},[4,39,114,144,184,244,293,362],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"\u002Fgetting-started","1.getting-started",[10,15,20,25,30,35],{"title":11,"path":12,"stem":13,"icon":14},"Learning Path","\u002Fgetting-started\u002Flearning-path","1.getting-started\u002F1.learning-path","i-lucide-map",{"title":16,"path":17,"stem":18,"icon":19},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F2.introduction","i-lucide-house",{"title":21,"path":22,"stem":23,"icon":24},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F3.installation","i-lucide-download",{"title":26,"path":27,"stem":28,"icon":29},"Your First Program","\u002Fgetting-started\u002Ffirst-program","1.getting-started\u002F4.first-program","i-lucide-play",{"title":31,"path":32,"stem":33,"icon":34},"Modules and Dependencies","\u002Fgetting-started\u002Fmodules-and-dependencies","1.getting-started\u002F5.modules-and-dependencies","i-lucide-package-open",{"title":36,"path":37,"stem":38,"icon":34},"Advanced Modules","\u002Fgetting-started\u002Fadvanced-modules","1.getting-started\u002F6.advanced-modules",{"title":40,"path":41,"stem":42,"children":43,"page":6},"Fundamentals","\u002Ffundamentals","2.fundamentals",[44,49,54,59,64,69,74,79,84,89,94,99,104,109],{"title":45,"path":46,"stem":47,"icon":48},"Program Structure","\u002Ffundamentals\u002Fprogram-structure","2.fundamentals\u002F1.program-structure","i-lucide-workflow",{"title":50,"path":51,"stem":52,"icon":53},"Structs and Methods","\u002Ffundamentals\u002Fstructs-and-methods","2.fundamentals\u002F10.structs-and-methods","i-lucide-box",{"title":55,"path":56,"stem":57,"icon":58},"Interfaces","\u002Ffundamentals\u002Finterfaces","2.fundamentals\u002F11.interfaces","i-lucide-plug",{"title":60,"path":61,"stem":62,"icon":63},"Error Handling","\u002Ffundamentals\u002Ferrors","2.fundamentals\u002F12.errors","i-lucide-triangle-alert",{"title":65,"path":66,"stem":67,"icon":68},"Defined Types and Type Aliases","\u002Ffundamentals\u002Fdefined-types","2.fundamentals\u002F13.defined-types","i-lucide-tags",{"title":70,"path":71,"stem":72,"icon":73},"Generics","\u002Ffundamentals\u002Fgenerics","2.fundamentals\u002F14.generics","i-lucide-blocks",{"title":75,"path":76,"stem":77,"icon":78},"Project Structure","\u002Ffundamentals\u002Fproject-structure","2.fundamentals\u002F2.project-structure","i-lucide-folder-tree",{"title":80,"path":81,"stem":82,"icon":83},"Project Layout","\u002Ffundamentals\u002Fproject-layout","2.fundamentals\u002F3.project-layout","i-lucide-layout",{"title":85,"path":86,"stem":87,"icon":88},"Variables and Data Types","\u002Ffundamentals\u002Fvariables-and-types","2.fundamentals\u002F4.variables-and-types","i-lucide-variable",{"title":90,"path":91,"stem":92,"icon":93},"Functions","\u002Ffundamentals\u002Ffunctions","2.fundamentals\u002F5.functions","i-lucide-braces",{"title":95,"path":96,"stem":97,"icon":98},"Control Statements","\u002Ffundamentals\u002Fcontrol-statements","2.fundamentals\u002F6.control-statements","i-lucide-git-branch",{"title":100,"path":101,"stem":102,"icon":103},"Pointers","\u002Ffundamentals\u002Fpointers","2.fundamentals\u002F7.pointers","i-lucide-mouse-pointer-2",{"title":105,"path":106,"stem":107,"icon":108},"Arrays and Slices","\u002Ffundamentals\u002Farrays-and-slices","2.fundamentals\u002F8.arrays-and-slices","i-lucide-list",{"title":110,"path":111,"stem":112,"icon":113},"Maps","\u002Ffundamentals\u002Fmaps","2.fundamentals\u002F9.maps","i-lucide-table-properties",{"title":115,"path":116,"stem":117,"children":118,"page":6},"Concurrency","\u002Fconcurrency","3.concurrency",[119,124,129,134,139],{"title":120,"path":121,"stem":122,"icon":123},"Concurrency Model","\u002Fconcurrency\u002Fconcurrency-model","3.concurrency\u002F1.concurrency-model","i-lucide-network",{"title":125,"path":126,"stem":127,"icon":128},"Goroutines","\u002Fconcurrency\u002Fgoroutines","3.concurrency\u002F2.goroutines","i-lucide-git-fork",{"title":130,"path":131,"stem":132,"icon":133},"Channels","\u002Fconcurrency\u002Fchannels","3.concurrency\u002F3.channels","i-lucide-arrow-left-right",{"title":135,"path":136,"stem":137,"icon":138},"Select and Cancellation","\u002Fconcurrency\u002Fselect-and-cancellation","3.concurrency\u002F4.select-and-cancellation","i-lucide-circle-stop",{"title":140,"path":141,"stem":142,"icon":143},"Synchronization","\u002Fconcurrency\u002Fsynchronization","3.concurrency\u002F5.synchronization","i-lucide-lock-keyhole",{"title":145,"path":146,"stem":147,"children":148,"page":6},"Standard Library","\u002Fstandard-library","4.standard-library",[149,154,159,164,169,174,179],{"title":150,"path":151,"stem":152,"icon":153},"Standard Library Overview","\u002Fstandard-library\u002Foverview","4.standard-library\u002F1.overview","i-lucide-library",{"title":155,"path":156,"stem":157,"icon":158},"Text and Formatting","\u002Fstandard-library\u002Ftext-and-formatting","4.standard-library\u002F2.text-and-formatting","i-lucide-text",{"title":160,"path":161,"stem":162,"icon":163},"Files and JSON","\u002Fstandard-library\u002Ffiles-and-json","4.standard-library\u002F3.files-and-json","i-lucide-file-json",{"title":165,"path":166,"stem":167,"icon":168},"HTTP Clients and Servers","\u002Fstandard-library\u002Fhttp","4.standard-library\u002F4.http","i-lucide-server",{"title":170,"path":171,"stem":172,"icon":173},"Testing","\u002Fstandard-library\u002Ftesting","4.standard-library\u002F5.testing","i-lucide-flask-conical",{"title":175,"path":176,"stem":177,"icon":178},"Command-Line Tools and Configuration","\u002Fstandard-library\u002Fcommand-line-and-configuration","4.standard-library\u002F6.command-line-and-configuration","i-lucide-terminal-square",{"title":180,"path":181,"stem":182,"icon":183},"Structured Logging","\u002Fstandard-library\u002Fstructured-logging","4.standard-library\u002F7.structured-logging","i-lucide-scroll-text",{"title":185,"path":186,"stem":187,"children":188,"page":6},"Backend Development","\u002Fbackend-development","5.backend-development",[189,194,199,204,209,214,219,224,229,234,239],{"title":190,"path":191,"stem":192,"icon":193},"Backend Roadmap","\u002Fbackend-development\u002Fbackend-roadmap","5.backend-development\u002F1.backend-roadmap","i-lucide-route",{"title":195,"path":196,"stem":197,"icon":198},"Graceful Shutdown","\u002Fbackend-development\u002Fgraceful-shutdown","5.backend-development\u002F10.graceful-shutdown","i-lucide-power",{"title":200,"path":201,"stem":202,"icon":203},"Production Checklist","\u002Fbackend-development\u002Fproduction-checklist","5.backend-development\u002F11.production-checklist","i-lucide-clipboard-check",{"title":205,"path":206,"stem":207,"icon":208},"HTTP API Design","\u002Fbackend-development\u002Fhttp-api-design","5.backend-development\u002F2.http-api-design","i-lucide-waypoints",{"title":210,"path":211,"stem":212,"icon":213},"Middleware","\u002Fbackend-development\u002Fmiddleware","5.backend-development\u002F3.middleware","i-lucide-layers-3",{"title":215,"path":216,"stem":217,"icon":218},"Validation","\u002Fbackend-development\u002Fvalidation","5.backend-development\u002F4.validation","i-lucide-list-checks",{"title":220,"path":221,"stem":222,"icon":223},"Application Wiring","\u002Fbackend-development\u002Fapplication-wiring","5.backend-development\u002F5.application-wiring","i-lucide-cable",{"title":225,"path":226,"stem":227,"icon":228},"Observability","\u002Fbackend-development\u002Fobservability","5.backend-development\u002F6.observability","i-lucide-activity",{"title":230,"path":231,"stem":232,"icon":233},"Database SQL","\u002Fbackend-development\u002Fdatabase-sql","5.backend-development\u002F7.database-sql","i-lucide-database",{"title":235,"path":236,"stem":237,"icon":238},"Transactions","\u002Fbackend-development\u002Ftransactions","5.backend-development\u002F8.transactions","i-lucide-repeat-2",{"title":240,"path":241,"stem":242,"icon":243},"Authentication and Authorization","\u002Fbackend-development\u002Fauthentication","5.backend-development\u002F9.authentication","i-lucide-shield-check",{"title":245,"path":246,"stem":247,"children":248,"page":6},"Advanced Go","\u002Fadvanced-go","6.advanced-go",[249,254,259,264,269,274,278,283,288],{"title":250,"path":251,"stem":252,"icon":253},"Advanced Go Roadmap","\u002Fadvanced-go\u002Fadvanced-roadmap","6.advanced-go\u002F1.advanced-roadmap","i-lucide-brain-circuit",{"title":255,"path":256,"stem":257,"icon":258},"Reflection","\u002Fadvanced-go\u002Freflection","6.advanced-go\u002F2.reflection","i-lucide-scan-search",{"title":260,"path":261,"stem":262,"icon":263},"Memory and Garbage Collection","\u002Fadvanced-go\u002Fmemory-and-garbage-collection","6.advanced-go\u002F3.memory-and-garbage-collection","i-lucide-memory-stick",{"title":265,"path":266,"stem":267,"icon":268},"Benchmarking and Profiling","\u002Fadvanced-go\u002Fbenchmarking-and-profiling","6.advanced-go\u002F4.benchmarking-and-profiling","i-lucide-gauge",{"title":270,"path":271,"stem":272,"icon":273},"Advanced Testing and Fuzzing","\u002Fadvanced-go\u002Fadvanced-testing-and-fuzzing","6.advanced-go\u002F5.advanced-testing-and-fuzzing","i-lucide-microscope",{"title":275,"path":276,"stem":277,"icon":48},"Advanced Concurrency","\u002Fadvanced-go\u002Fadvanced-concurrency","6.advanced-go\u002F6.advanced-concurrency",{"title":279,"path":280,"stem":281,"icon":282},"Unsafe and C Boundaries","\u002Fadvanced-go\u002Funsafe-and-cgo","6.advanced-go\u002F7.unsafe-and-cgo","i-lucide-radiation",{"title":284,"path":285,"stem":286,"icon":287},"Package and API Design","\u002Fadvanced-go\u002Fpackage-and-api-design","6.advanced-go\u002F8.package-and-api-design","i-lucide-boxes",{"title":289,"path":290,"stem":291,"icon":292},"Distributed Reliability","\u002Fadvanced-go\u002Fdistributed-reliability","6.advanced-go\u002F9.distributed-reliability","i-lucide-cloud-cog",{"title":294,"path":295,"stem":296,"children":297,"page":6},"Projects","\u002Fprojects","7.projects",[298,316,332,347],{"title":299,"path":300,"stem":301,"children":302,"icon":305},"CLI Task Manager","\u002Fprojects\u002Fcli-task-manager","7.projects\u002F1.cli-task-manager\u002Findex",[303,306,311],{"title":304,"path":300,"stem":301,"icon":305},"Project — CLI Task Manager","i-lucide-list-todo",{"title":307,"path":308,"stem":309,"icon":310},"CLI — Domain and Storage","\u002Fprojects\u002Fcli-task-manager\u002Fdomain-and-storage","7.projects\u002F1.cli-task-manager\u002F1.domain-and-storage","i-lucide-save",{"title":312,"path":313,"stem":314,"icon":315},"CLI — Commands and Tests","\u002Fprojects\u002Fcli-task-manager\u002Fcommands-and-tests","7.projects\u002F1.cli-task-manager\u002F2.commands-and-tests","i-lucide-terminal",{"title":317,"path":318,"stem":319,"children":320,"icon":323},"Concurrent URL Checker","\u002Fprojects\u002Fconcurrent-url-checker","7.projects\u002F2.concurrent-url-checker\u002Findex",[321,324,328],{"title":322,"path":318,"stem":319,"icon":323},"Project — Concurrent URL Checker","i-lucide-radar",{"title":325,"path":326,"stem":327,"icon":128},"URL Checker — Worker Pipeline","\u002Fprojects\u002Fconcurrent-url-checker\u002Fworker-pipeline","7.projects\u002F2.concurrent-url-checker\u002F1.worker-pipeline",{"title":329,"path":330,"stem":331,"icon":173},"URL Checker — Cancellation and Tests","\u002Fprojects\u002Fconcurrent-url-checker\u002Fcancellation-and-tests","7.projects\u002F2.concurrent-url-checker\u002F2.cancellation-and-tests",{"title":333,"path":334,"stem":335,"children":336},"File-backed API","\u002Fprojects\u002Ffile-backed-api","7.projects\u002F3.file-backed-api\u002Findex",[337,339,343],{"title":338,"path":334,"stem":335},"File-backed notes API",{"title":340,"path":341,"stem":342},"File store and concurrency","\u002Fprojects\u002Ffile-backed-api\u002Ffile-store-and-concurrency","7.projects\u002F3.file-backed-api\u002F1.file-store-and-concurrency",{"title":344,"path":345,"stem":346},"HTTP layer and tests","\u002Fprojects\u002Ffile-backed-api\u002Fhttp-and-tests","7.projects\u002F3.file-backed-api\u002F2.http-and-tests",{"title":348,"path":349,"stem":350,"children":351},"Production REST API","\u002Fprojects\u002Fproduction-rest-api","7.projects\u002F4.production-rest-api\u002Findex",[352,354,358],{"title":353,"path":349,"stem":350},"Production REST API capstone",{"title":355,"path":356,"stem":357},"Persistence and authentication","\u002Fprojects\u002Fproduction-rest-api\u002Fpersistence-and-auth","7.projects\u002F4.production-rest-api\u002F1.persistence-and-auth",{"title":359,"path":360,"stem":361},"Operations and release","\u002Fprojects\u002Fproduction-rest-api\u002Foperations-and-release","7.projects\u002F4.production-rest-api\u002F2.operations-and-release",{"title":363,"path":364,"stem":365,"children":366,"page":6},"Meta","\u002Fmeta","99.meta",[367,372],{"title":368,"path":369,"stem":370,"icon":371},"About","\u002Fmeta\u002Fabout","99.meta\u002F1.about","i-lucide-info",{"title":373,"path":374,"stem":375,"icon":376},"Acknowledgements","\u002Fmeta\u002Facknowledgements","99.meta\u002F2.acknowledgements","i-lucide-heart-handshake",{"id":378,"title":31,"body":379,"description":1690,"extension":1691,"links":1692,"meta":1693,"navigation":1694,"path":32,"seo":1695,"stem":33,"__hash__":1697},"docs\u002F1.getting-started\u002F5.modules-and-dependencies.md",{"type":380,"value":381,"toc":1677},"minimark",[382,388,393,406,410,413,491,494,498,501,548,551,559,562,654,673,680,789,792,807,813,834,845,849,858,993,996,1010,1027,1097,1110,1117,1123,1129,1136,1141,1159,1163,1168,1183,1186,1208,1211,1225,1233,1237,1246,1258,1270,1274,1339,1343,1377,1627,1631,1646,1652,1667,1670,1673],[383,384],"learning-lesson-meta",{"description":385,"difficulty":386,"prerequisites":26,"time":387},"Learn what packages and modules are, how to organise your own code, and how to add and remove libraries safely.","Beginner","35 minutes",[389,390,392],"h2",{"id":391},"what-you-will-learn","What you will learn",[394,395,396,397,401,402,405],"p",{},"Real programs are never one file. In this lesson you will learn how Go organises code into packages and modules, how to split your own program into pieces, and how to add a library written by someone else. You will also learn what ",[398,399,400],"code",{},"go.mod"," and ",[398,403,404],{},"go.sum"," are for and which commands keep them correct.",[389,407,409],{"id":408},"package-module-repository","Package, module, repository",[394,411,412],{},"Three words get mixed up, so fix them first.",[414,415,416,432],"table",{},[417,418,419],"thead",{},[420,421,422,426,429],"tr",{},[423,424,425],"th",{},"Term",[423,427,428],{},"What it is",[423,430,431],{},"Example",[433,434,435,460,478],"tbody",{},[420,436,437,444,455],{},[438,439,440],"td",{},[441,442,443],"strong",{},"Package",[438,445,446,447,450,451,454],{},"A folder of ",[398,448,449],{},".go"," files compiled together. Each file starts with ",[398,452,453],{},"package name",".",[438,456,457],{},[398,458,459],{},"fmt",[420,461,462,467,473],{},[438,463,464],{},[441,465,466],{},"Module",[438,468,469,470,472],{},"A project: one or more packages versioned together, described by a ",[398,471,400],{}," file.",[438,474,475],{},[398,476,477],{},"example.com\u002Fhello-go",[420,479,480,485,488],{},[438,481,482],{},[441,483,484],{},"Repository",[438,486,487],{},"A place in version control (such as a Git repo). It usually holds one module.",[438,489,490],{},"a GitHub repo",[394,492,493],{},"An analogy: a module is a book, a package is a chapter, and a repository is the shelf the book is stored on. In a small project all three overlap, which is why they feel like the same thing.",[389,495,497],{"id":496},"split-your-own-code-into-packages","Split your own code into packages",[394,499,500],{},"Start with the module from the last lesson, or make a new one:",[502,503,509],"pre",{"className":504,"code":505,"filename":506,"language":507,"meta":508,"style":508},"language-bash shiki shiki-themes solarized-light material-theme one-dark-pro","mkdir tasker\ncd tasker\ngo mod init example.com\u002Ftasker\n","Terminal","bash","",[398,510,511,524,533],{"__ignoreMap":508},[512,513,516,520],"span",{"class":514,"line":515},"line",1,[512,517,519],{"class":518},"sqRHY","mkdir",[512,521,523],{"class":522},"sVazx"," tasker\n",[512,525,527,531],{"class":514,"line":526},2,[512,528,530],{"class":529},"sTZgv","cd",[512,532,523],{"class":522},[512,534,536,539,542,545],{"class":514,"line":535},3,[512,537,538],{"class":518},"go",[512,540,541],{"class":522}," mod",[512,543,544],{"class":522}," init",[512,546,547],{"class":522}," example.com\u002Ftasker\n",[394,549,550],{},"Create this layout:",[502,552,557],{"className":553,"code":555,"language":556,"meta":508},[554],"language-text","tasker\u002F\n├── go.mod\n├── main.go\n└── greeting\u002F\n    └── greeting.go\n","text",[398,558,555],{"__ignoreMap":508},[394,560,561],{},"The new package lives in its own folder:",[502,563,567],{"className":564,"code":565,"filename":566,"language":538,"meta":508,"style":508},"language-go shiki shiki-themes solarized-light material-theme one-dark-pro","package greeting\n\nfunc Hello(name string) string {\n    return \"Hello, \" + name + \"!\"\n}\n","greeting\u002Fgreeting.go",[398,568,569,579,585,614,648],{"__ignoreMap":508},[512,570,571,575],{"class":514,"line":515},[512,572,574],{"class":573},"sEOdo","package",[512,576,578],{"class":577},"snwKR"," greeting\n",[512,580,581],{"class":514,"line":526},[512,582,584],{"emptyLinePlaceholder":583},true,"\n",[512,586,587,590,594,598,602,606,609,611],{"class":514,"line":535},[512,588,589],{"class":573},"func",[512,591,593],{"class":592},"sisdC"," Hello",[512,595,597],{"class":596},"shFME","(",[512,599,601],{"class":600},"syre3","name",[512,603,605],{"class":604},"sF6sA"," string",[512,607,608],{"class":596},")",[512,610,605],{"class":604},[512,612,613],{"class":596}," {\n",[512,615,617,621,625,628,631,634,638,640,642,645],{"class":514,"line":616},4,[512,618,620],{"class":619},"s7Bcg","    return",[512,622,624],{"class":623},"sED5a"," \"",[512,626,627],{"class":522},"Hello, ",[512,629,630],{"class":623},"\"",[512,632,633],{"class":573}," +",[512,635,637],{"class":636},"s45-6"," name",[512,639,633],{"class":573},[512,641,624],{"class":623},[512,643,644],{"class":522},"!",[512,646,647],{"class":623},"\"\n",[512,649,651],{"class":514,"line":650},5,[512,652,653],{"class":596},"}\n",[394,655,656,657,660,661,664,665,668,669,672],{},"Two things to notice. The file says ",[398,658,659],{},"package greeting",", matching its folder name. And ",[398,662,663],{},"Hello"," starts with a capital letter, which makes it ",[441,666,667],{},"exported",": visible to other packages. A function named ",[398,670,671],{},"hello"," would be private to this package.",[394,674,675,676,679],{},"Now use it from ",[398,677,678],{},"main.go",":",[502,681,683],{"className":564,"code":682,"filename":678,"language":538,"meta":508,"style":508},"package main\n\nimport (\n    \"fmt\"\n\n    \"example.com\u002Ftasker\u002Fgreeting\"\n)\n\nfunc main() {\n    fmt.Println(greeting.Hello(\"Gopher\"))\n}\n",[398,684,685,692,696,704,714,718,728,734,739,752,784],{"__ignoreMap":508},[512,686,687,689],{"class":514,"line":515},[512,688,574],{"class":573},[512,690,691],{"class":577}," main\n",[512,693,694],{"class":514,"line":526},[512,695,584],{"emptyLinePlaceholder":583},[512,697,698,701],{"class":514,"line":535},[512,699,700],{"class":619},"import",[512,702,703],{"class":596}," (\n",[512,705,706,709,712],{"class":514,"line":616},[512,707,708],{"class":623},"    \"",[512,710,459],{"class":711},"sdLNw",[512,713,647],{"class":623},[512,715,716],{"class":514,"line":650},[512,717,584],{"emptyLinePlaceholder":583},[512,719,721,723,726],{"class":514,"line":720},6,[512,722,708],{"class":623},[512,724,725],{"class":711},"example.com\u002Ftasker\u002Fgreeting",[512,727,647],{"class":623},[512,729,731],{"class":514,"line":730},7,[512,732,733],{"class":596},")\n",[512,735,737],{"class":514,"line":736},8,[512,738,584],{"emptyLinePlaceholder":583},[512,740,742,744,747,750],{"class":514,"line":741},9,[512,743,589],{"class":573},[512,745,746],{"class":592}," main",[512,748,749],{"class":596},"()",[512,751,613],{"class":596},[512,753,755,758,760,763,765,768,770,772,774,776,779,781],{"class":514,"line":754},10,[512,756,757],{"class":636},"    fmt",[512,759,454],{"class":596},[512,761,762],{"class":592},"Println",[512,764,597],{"class":596},[512,766,767],{"class":636},"greeting",[512,769,454],{"class":596},[512,771,663],{"class":592},[512,773,597],{"class":596},[512,775,630],{"class":623},[512,777,778],{"class":522},"Gopher",[512,780,630],{"class":623},[512,782,783],{"class":596},"))\n",[512,785,787],{"class":514,"line":786},11,[512,788,653],{"class":596},[394,790,791],{},"Run it:",[502,793,795],{"className":504,"code":794,"filename":506,"language":507,"meta":508,"style":508},"go run .\n",[398,796,797],{"__ignoreMap":508},[512,798,799,801,804],{"class":514,"line":515},[512,800,538],{"class":518},[512,802,803],{"class":522}," run",[512,805,806],{"class":522}," .\n",[502,808,811],{"className":809,"code":810,"language":556,"meta":508},[554],"Hello, Gopher!\n",[398,812,810],{"__ignoreMap":508},[394,814,815,816,819,820,823,824,827,828,830,831,833],{},"The import path is the ",[441,817,818],{},"module path plus the folder path",": ",[398,821,822],{},"example.com\u002Ftasker"," + ",[398,825,826],{},"\u002Fgreeting",". Inside the code you refer to the package by its short name, ",[398,829,767],{},". The standard library follows the same idea. ",[398,832,459],{}," is just a package with a short path.",[835,836,837,838,840,841,844],"note",{},"If you forget the capital letter on ",[398,839,663],{},", the compiler says ",[398,842,843],{},"undefined: greeting.hello"," or \"refers to unexported name\". Exported or not is decided by that first letter alone.",[389,846,848],{"id":847},"add-a-third-party-dependency","Add a third-party dependency",[394,850,851,852,855,856,679],{},"Libraries from other people are modules too. Let's use ",[398,853,854],{},"github.com\u002Fgoogle\u002Fuuid",", a small and widely used library for generating unique IDs. Change ",[398,857,678],{},[502,859,861],{"className":564,"code":860,"filename":678,"language":538,"meta":508,"style":508},"package main\n\nimport (\n    \"fmt\"\n\n    \"github.com\u002Fgoogle\u002Fuuid\"\n\n    \"example.com\u002Ftasker\u002Fgreeting\"\n)\n\nfunc main() {\n    fmt.Println(greeting.Hello(\"Gopher\"))\n    fmt.Println(\"Your ID:\", uuid.NewString())\n}\n",[398,862,863,869,873,879,887,891,899,903,911,915,919,929,956,988],{"__ignoreMap":508},[512,864,865,867],{"class":514,"line":515},[512,866,574],{"class":573},[512,868,691],{"class":577},[512,870,871],{"class":514,"line":526},[512,872,584],{"emptyLinePlaceholder":583},[512,874,875,877],{"class":514,"line":535},[512,876,700],{"class":619},[512,878,703],{"class":596},[512,880,881,883,885],{"class":514,"line":616},[512,882,708],{"class":623},[512,884,459],{"class":711},[512,886,647],{"class":623},[512,888,889],{"class":514,"line":650},[512,890,584],{"emptyLinePlaceholder":583},[512,892,893,895,897],{"class":514,"line":720},[512,894,708],{"class":623},[512,896,854],{"class":711},[512,898,647],{"class":623},[512,900,901],{"class":514,"line":730},[512,902,584],{"emptyLinePlaceholder":583},[512,904,905,907,909],{"class":514,"line":736},[512,906,708],{"class":623},[512,908,725],{"class":711},[512,910,647],{"class":623},[512,912,913],{"class":514,"line":741},[512,914,733],{"class":596},[512,916,917],{"class":514,"line":754},[512,918,584],{"emptyLinePlaceholder":583},[512,920,921,923,925,927],{"class":514,"line":786},[512,922,589],{"class":573},[512,924,746],{"class":592},[512,926,749],{"class":596},[512,928,613],{"class":596},[512,930,932,934,936,938,940,942,944,946,948,950,952,954],{"class":514,"line":931},12,[512,933,757],{"class":636},[512,935,454],{"class":596},[512,937,762],{"class":592},[512,939,597],{"class":596},[512,941,767],{"class":636},[512,943,454],{"class":596},[512,945,663],{"class":592},[512,947,597],{"class":596},[512,949,630],{"class":623},[512,951,778],{"class":522},[512,953,630],{"class":623},[512,955,783],{"class":596},[512,957,959,961,963,965,967,969,972,974,977,980,982,985],{"class":514,"line":958},13,[512,960,757],{"class":636},[512,962,454],{"class":596},[512,964,762],{"class":592},[512,966,597],{"class":596},[512,968,630],{"class":623},[512,970,971],{"class":522},"Your ID:",[512,973,630],{"class":623},[512,975,976],{"class":596},",",[512,978,979],{"class":636}," uuid",[512,981,454],{"class":596},[512,983,984],{"class":592},"NewString",[512,986,987],{"class":596},"())\n",[512,989,991],{"class":514,"line":990},14,[512,992,653],{"class":596},[394,994,995],{},"If you run it now, Go complains that the package is missing. Fix that with:",[502,997,999],{"className":504,"code":998,"filename":506,"language":507,"meta":508,"style":508},"go mod tidy\n",[398,1000,1001],{"__ignoreMap":508},[512,1002,1003,1005,1007],{"class":514,"line":515},[512,1004,538],{"class":518},[512,1006,541],{"class":522},[512,1008,1009],{"class":522}," tidy\n",[394,1011,1012,1015,1016,401,1018,1020,1021,1024,1025,679],{},[398,1013,1014],{},"go mod tidy"," reads your imports, downloads whatever is missing, and updates ",[398,1017,400],{},[398,1019,404],{},". Run ",[398,1022,1023],{},"go run ."," and you get your greeting plus a random ID. Then look at ",[398,1026,400],{},[502,1028,1030],{"className":564,"code":1029,"filename":400,"language":538,"meta":508,"style":508},"module example.com\u002Ftasker\n\ngo 1.26\n\nrequire github.com\u002Fgoogle\u002Fuuid v1.6.0\n",[398,1031,1032,1051,1055,1063,1067],{"__ignoreMap":508},[512,1033,1034,1037,1040,1042,1045,1048],{"class":514,"line":515},[512,1035,1036],{"class":636},"module",[512,1038,1039],{"class":636}," example",[512,1041,454],{"class":596},[512,1043,1044],{"class":636},"com",[512,1046,1047],{"class":573},"\u002F",[512,1049,1050],{"class":636},"tasker\n",[512,1052,1053],{"class":514,"line":526},[512,1054,584],{"emptyLinePlaceholder":583},[512,1056,1057,1059],{"class":514,"line":535},[512,1058,538],{"class":619},[512,1060,1062],{"class":1061},"sAJzr"," 1.26\n",[512,1064,1065],{"class":514,"line":616},[512,1066,584],{"emptyLinePlaceholder":583},[512,1068,1069,1072,1075,1077,1079,1081,1084,1086,1089,1092,1094],{"class":514,"line":650},[512,1070,1071],{"class":636},"require",[512,1073,1074],{"class":636}," github",[512,1076,454],{"class":596},[512,1078,1044],{"class":636},[512,1080,1047],{"class":573},[512,1082,1083],{"class":636},"google",[512,1085,1047],{"class":573},[512,1087,1088],{"class":636},"uuid",[512,1090,1091],{"class":636}," v1",[512,1093,454],{"class":596},[512,1095,1096],{"class":1061},"6.0\n",[394,1098,1099,1100,1102,1103,1105,1106,1109],{},"The new ",[398,1101,1071],{}," line says your module depends on ",[398,1104,1088],{}," at version ",[398,1107,1108],{},"v1.6.0",". Anyone who clones your project gets exactly that version.",[389,1111,1113,1114,1116],{"id":1112},"what-gosum-does","What ",[398,1115,404],{}," does",[394,1118,1119,1120,1122],{},"A second file, ",[398,1121,404],{},", appeared. Each line looks like this:",[502,1124,1127],{"className":1125,"code":1126,"language":556,"meta":508},[554],"github.com\u002Fgoogle\u002Fuuid v1.6.0 h1:...\ngithub.com\u002Fgoogle\u002Fuuid v1.6.0\u002Fgo.mod h1:...\n",[398,1128,1126],{"__ignoreMap":508},[394,1130,1131,1132,1135],{},"The ",[398,1133,1134],{},"h1:"," values are cryptographic hashes of the downloaded code. Go checks them every time it downloads a module, so if someone changed the library after you first used it, you find out instead of silently running different code.",[394,1137,1138,1139,679],{},"Three rules for ",[398,1140,404],{},[1142,1143,1144,1150,1153],"ol",{},[1145,1146,1147,1148,454],"li",{},"Commit it to version control, along with ",[398,1149,400],{},[1145,1151,1152],{},"Never edit it by hand.",[1145,1154,1155,1156,1158],{},"Never delete it to \"fix\" an error. Run ",[398,1157,1014],{}," instead and let Go regenerate it.",[389,1160,1162],{"id":1161},"choose-a-version","Choose a version",[394,1164,1165,1167],{},[398,1166,1014],{}," picks a suitable version for you, but you can ask for a specific one:",[502,1169,1171],{"className":504,"code":1170,"filename":506,"language":507,"meta":508,"style":508},"go get github.com\u002Fgoogle\u002Fuuid@v1.6.0\n",[398,1172,1173],{"__ignoreMap":508},[512,1174,1175,1177,1180],{"class":514,"line":515},[512,1176,538],{"class":518},[512,1178,1179],{"class":522}," get",[512,1181,1182],{"class":522}," github.com\u002Fgoogle\u002Fuuid@v1.6.0\n",[394,1184,1185],{},"To see which of your dependencies have newer releases:",[502,1187,1189],{"className":504,"code":1188,"filename":506,"language":507,"meta":508,"style":508},"go list -m -u all\n",[398,1190,1191],{"__ignoreMap":508},[512,1192,1193,1195,1198,1202,1205],{"class":514,"line":515},[512,1194,538],{"class":518},[512,1196,1197],{"class":522}," list",[512,1199,1201],{"class":1200},"s2SA0"," -m",[512,1203,1204],{"class":1200}," -u",[512,1206,1207],{"class":522}," all\n",[394,1209,1210],{},"To upgrade one dependency to its latest release:",[502,1212,1214],{"className":504,"code":1213,"filename":506,"language":507,"meta":508,"style":508},"go get github.com\u002Fgoogle\u002Fuuid@latest\n",[398,1215,1216],{"__ignoreMap":508},[512,1217,1218,1220,1222],{"class":514,"line":515},[512,1219,538],{"class":518},[512,1221,1179],{"class":522},[512,1223,1224],{"class":522}," github.com\u002Fgoogle\u002Fuuid@latest\n",[394,1226,1227,1228,401,1230,1232],{},"After any upgrade, run your tests and look at what changed in ",[398,1229,400],{},[398,1231,404],{},". A dependency update is a code change, not background noise, because the new version may behave differently.",[389,1234,1236],{"id":1235},"remove-a-dependency","Remove a dependency",[394,1238,1239,1240,1242,1243,1245],{},"Delete the ",[398,1241,1088],{}," import and the line that uses it from ",[398,1244,678],{},", then run:",[502,1247,1248],{"className":504,"code":998,"filename":506,"language":507,"meta":508,"style":508},[398,1249,1250],{"__ignoreMap":508},[512,1251,1252,1254,1256],{"class":514,"line":515},[512,1253,538],{"class":518},[512,1255,541],{"class":522},[512,1257,1009],{"class":522},[394,1259,1260,1261,1263,1264,1266,1267,1269],{},"Go notices that nothing imports ",[398,1262,1088],{}," any more and removes it from ",[398,1265,400],{},". This is the second half of why ",[398,1268,1014],{}," is so useful: it adds what you need and removes what you do not.",[389,1271,1273],{"id":1272},"common-mistakes","Common mistakes",[1275,1276,1277,1290,1296,1308,1318,1330],"ul",{},[1145,1278,1279,1282,1283,1286,1287,1289],{},[441,1280,1281],{},"Folder and package name do not match."," The package in ",[398,1284,1285],{},"greeting\u002F"," should be ",[398,1288,659],{},". A mismatch works but confuses everyone reading it.",[1145,1291,1292,1295],{},[441,1293,1294],{},"Forgetting the capital letter"," on a function you want to use from another package.",[1145,1297,1298,1301,1302,1304,1305,1307],{},[441,1299,1300],{},"Using the wrong import path."," It must start with the ",[398,1303,1036],{}," line from ",[398,1306,400],{},", not just the folder name.",[1145,1309,1310,1317],{},[441,1311,1312,1313,1316],{},"Running ",[398,1314,1315],{},"go get"," and not reading the diff."," One upgrade can pull in changes to other modules.",[1145,1319,1320,1326,1327,1329],{},[441,1321,1322,1323,1325],{},"Deleting ",[398,1324,404],{}," to fix an error."," This throws away your protection. Use ",[398,1328,1014],{}," instead.",[1145,1331,1332,1335,1336,454],{},[441,1333,1334],{},"Using a made-up module path for a library others will install."," If it will be published, the path must match a real address, like ",[398,1337,1338],{},"github.com\u002Fyourname\u002Ftasker",[389,1340,1342],{"id":1341},"practice","Practice",[1142,1344,1345,1359,1368],{},[1145,1346,1347,1348,1351,1352,1355,1356,454],{},"Create a module named ",[398,1349,1350],{},"example.com\u002Fcalc"," with a package ",[398,1353,1354],{},"calc"," in its own folder. Add an exported function ",[398,1357,1358],{},"Add(a, b int) int",[1145,1360,1361,1362,1364,1365,454],{},"Call it from ",[398,1363,678],{}," and print the result of ",[398,1366,1367],{},"Add(2, 3)",[1145,1369,1370,1371,1373,1374,1376],{},"Add ",[398,1372,854],{},", print one ID, then remove the dependency again. Check how ",[398,1375,400],{}," changes each time.",[1378,1379,1380],"accordion",{},[1381,1382,1385,1420,1478,1571,1597],"accordion-item",{"icon":1383,"label":1384},"i-lucide-lightbulb","Show solution",[502,1386,1388],{"className":504,"code":1387,"filename":506,"language":507,"meta":508,"style":508},"mkdir calc\ncd calc\ngo mod init example.com\u002Fcalc\nmkdir calc\n",[398,1389,1390,1397,1403,1414],{"__ignoreMap":508},[512,1391,1392,1394],{"class":514,"line":515},[512,1393,519],{"class":518},[512,1395,1396],{"class":522}," calc\n",[512,1398,1399,1401],{"class":514,"line":526},[512,1400,530],{"class":529},[512,1402,1396],{"class":522},[512,1404,1405,1407,1409,1411],{"class":514,"line":535},[512,1406,538],{"class":518},[512,1408,541],{"class":522},[512,1410,544],{"class":522},[512,1412,1413],{"class":522}," example.com\u002Fcalc\n",[512,1415,1416,1418],{"class":514,"line":616},[512,1417,519],{"class":518},[512,1419,1396],{"class":522},[502,1421,1424],{"className":564,"code":1422,"filename":1423,"language":538,"meta":508,"style":508},"package calc\n\nfunc Add(a, b int) int {\n    return a + b\n}\n","calc\u002Fcalc.go",[398,1425,1426,1432,1436,1462,1474],{"__ignoreMap":508},[512,1427,1428,1430],{"class":514,"line":515},[512,1429,574],{"class":573},[512,1431,1396],{"class":577},[512,1433,1434],{"class":514,"line":526},[512,1435,584],{"emptyLinePlaceholder":583},[512,1437,1438,1440,1443,1445,1448,1450,1453,1456,1458,1460],{"class":514,"line":535},[512,1439,589],{"class":573},[512,1441,1442],{"class":592}," Add",[512,1444,597],{"class":596},[512,1446,1447],{"class":600},"a",[512,1449,976],{"class":596},[512,1451,1452],{"class":600}," b",[512,1454,1455],{"class":604}," int",[512,1457,608],{"class":596},[512,1459,1455],{"class":604},[512,1461,613],{"class":596},[512,1463,1464,1466,1469,1471],{"class":514,"line":616},[512,1465,620],{"class":619},[512,1467,1468],{"class":636}," a",[512,1470,633],{"class":573},[512,1472,1473],{"class":636}," b\n",[512,1475,1476],{"class":514,"line":650},[512,1477,653],{"class":596},[502,1479,1481],{"className":564,"code":1480,"filename":678,"language":538,"meta":508,"style":508},"package main\n\nimport (\n    \"fmt\"\n\n    \"example.com\u002Fcalc\u002Fcalc\"\n)\n\nfunc main() {\n    fmt.Println(calc.Add(2, 3))\n}\n",[398,1482,1483,1489,1493,1499,1507,1511,1520,1524,1528,1538,1567],{"__ignoreMap":508},[512,1484,1485,1487],{"class":514,"line":515},[512,1486,574],{"class":573},[512,1488,691],{"class":577},[512,1490,1491],{"class":514,"line":526},[512,1492,584],{"emptyLinePlaceholder":583},[512,1494,1495,1497],{"class":514,"line":535},[512,1496,700],{"class":619},[512,1498,703],{"class":596},[512,1500,1501,1503,1505],{"class":514,"line":616},[512,1502,708],{"class":623},[512,1504,459],{"class":711},[512,1506,647],{"class":623},[512,1508,1509],{"class":514,"line":650},[512,1510,584],{"emptyLinePlaceholder":583},[512,1512,1513,1515,1518],{"class":514,"line":720},[512,1514,708],{"class":623},[512,1516,1517],{"class":711},"example.com\u002Fcalc\u002Fcalc",[512,1519,647],{"class":623},[512,1521,1522],{"class":514,"line":730},[512,1523,733],{"class":596},[512,1525,1526],{"class":514,"line":736},[512,1527,584],{"emptyLinePlaceholder":583},[512,1529,1530,1532,1534,1536],{"class":514,"line":741},[512,1531,589],{"class":573},[512,1533,746],{"class":592},[512,1535,749],{"class":596},[512,1537,613],{"class":596},[512,1539,1540,1542,1544,1546,1548,1550,1552,1555,1557,1560,1562,1565],{"class":514,"line":754},[512,1541,757],{"class":636},[512,1543,454],{"class":596},[512,1545,762],{"class":592},[512,1547,597],{"class":596},[512,1549,1354],{"class":636},[512,1551,454],{"class":596},[512,1553,1554],{"class":592},"Add",[512,1556,597],{"class":596},[512,1558,1559],{"class":1061},"2",[512,1561,976],{"class":596},[512,1563,1564],{"class":1061}," 3",[512,1566,783],{"class":596},[512,1568,1569],{"class":514,"line":786},[512,1570,653],{"class":596},[394,1572,1573,1575,1576,1579,1580,1582,1583,1586,1587,1589,1590,1593,1594,1596],{},[398,1574,1023],{}," prints ",[398,1577,1578],{},"5",". The import path is ",[398,1581,1350],{}," (the module) plus ",[398,1584,1585],{},"\u002Fcalc"," (the folder). Both happen to be called ",[398,1588,1354],{},", which is a common source of confusion; you could name the folder ",[398,1591,1592],{},"mathutil"," and package ",[398,1595,1592],{}," to see the difference.",[394,1598,1599,1600,1602,1603,1606,1607,1609,1610,1612,1613,401,1616,1618,1619,1621,1622,1624,1625,454],{},"To add the dependency, import ",[398,1601,854],{},", call ",[398,1604,1605],{},"uuid.NewString()",", and run ",[398,1608,1014],{},". ",[398,1611,400],{}," gains ",[398,1614,1615],{},"require github.com\u002Fgoogle\u002Fuuid v1.6.0",[398,1617,404],{}," appears. To remove it, delete the import and the call, then run ",[398,1620,1014],{}," again. The ",[398,1623,1071],{}," line disappears from ",[398,1626,400],{},[389,1628,1630],{"id":1629},"summary","Summary",[394,1632,1633,1634,1636,1637,1639,1640,1642,1643,1645],{},"A package is a folder of Go files, a module is a project described by ",[398,1635,400],{},", and a repository is where the code is stored. Import paths combine the module path and the package folder, and a capital first letter exports a name. Use ",[398,1638,1014],{}," to add missing dependencies and remove unused ones, and ",[398,1641,1315],{}," to choose versions. ",[398,1644,404],{}," verifies downloads, so commit it and never edit it. Treat every dependency update as a code change you review.",[394,1647,1648,1649,454],{},"Replacing modules, workspaces, major versions, and vulnerability scanning come later, in ",[1447,1650,36],{"href":1651},"\u002Fadvanced\u002Fadvanced-modules",[394,1653,1654,1655,1661,1662,454],{},"Official references: ",[1447,1656,1660],{"href":1657,"rel":1658},"https:\u002F\u002Fgo.dev\u002Fdoc\u002Fmodules\u002Fmanaging-dependencies",[1659],"nofollow","Managing dependencies"," and the ",[1447,1663,1666],{"href":1664,"rel":1665},"https:\u002F\u002Fgo.dev\u002Fref\u002Fmod",[1659],"Go Modules Reference",[1668,1669],"learning-lesson-complete",{},[1671,1672],"learning-lesson-navigation",{"next":46,"nextTitle":45,"previous":27,"previousTitle":26},[1674,1675,1676],"style",{},"html pre.shiki code .sqRHY, html code.shiki .sqRHY{--shiki-light:#268BD2;--shiki-default:#FFCB6B;--shiki-dark:#61AFEF}html pre.shiki code .sVazx, html code.shiki .sVazx{--shiki-light:#2AA198;--shiki-default:#C3E88D;--shiki-dark:#98C379}html pre.shiki code .sTZgv, html code.shiki .sTZgv{--shiki-light:#268BD2;--shiki-default:#82AAFF;--shiki-dark:#56B6C2}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sEOdo, html code.shiki .sEOdo{--shiki-light:#859900;--shiki-default:#89DDFF;--shiki-dark:#C678DD}html pre.shiki code .snwKR, html code.shiki .snwKR{--shiki-light:#CB4B16;--shiki-default:#FFCB6B;--shiki-dark:#E5C07B}html pre.shiki code .sisdC, html code.shiki .sisdC{--shiki-light:#268BD2;--shiki-default:#82AAFF;--shiki-dark:#61AFEF}html pre.shiki code .shFME, html code.shiki .shFME{--shiki-light:#657B83;--shiki-default:#89DDFF;--shiki-dark:#ABB2BF}html pre.shiki code .syre3, html code.shiki .syre3{--shiki-light:#657B83;--shiki-light-font-style:inherit;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#E06C75;--shiki-dark-font-style:italic}html pre.shiki code .sF6sA, html code.shiki .sF6sA{--shiki-light:#586E75;--shiki-light-font-weight:bold;--shiki-default:#C792EA;--shiki-default-font-weight:inherit;--shiki-dark:#C678DD;--shiki-dark-font-weight:inherit}html pre.shiki code .s7Bcg, html code.shiki .s7Bcg{--shiki-light:#859900;--shiki-light-font-style:inherit;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#C678DD;--shiki-dark-font-style:inherit}html pre.shiki code .sED5a, html code.shiki .sED5a{--shiki-light:#2AA198;--shiki-default:#89DDFF;--shiki-dark:#98C379}html pre.shiki code .s45-6, html code.shiki .s45-6{--shiki-light:#268BD2;--shiki-default:#EEFFFF;--shiki-dark:#E06C75}html pre.shiki code .sdLNw, html code.shiki .sdLNw{--shiki-light:#2AA198;--shiki-default:#FFCB6B;--shiki-dark:#98C379}html pre.shiki code .sAJzr, html code.shiki .sAJzr{--shiki-light:#D33682;--shiki-default:#F78C6C;--shiki-dark:#D19A66}html pre.shiki code .s2SA0, html code.shiki .s2SA0{--shiki-light:#CB4B16;--shiki-default:#C3E88D;--shiki-dark:#D19A66}",{"title":508,"searchDepth":526,"depth":526,"links":1678},[1679,1680,1681,1682,1683,1685,1686,1687,1688,1689],{"id":391,"depth":526,"text":392},{"id":408,"depth":526,"text":409},{"id":496,"depth":526,"text":497},{"id":847,"depth":526,"text":848},{"id":1112,"depth":526,"text":1684},"What go.sum does",{"id":1161,"depth":526,"text":1162},{"id":1235,"depth":526,"text":1236},{"id":1272,"depth":526,"text":1273},{"id":1341,"depth":526,"text":1342},{"id":1629,"depth":526,"text":1630},"Understand packages and modules, split code into your own packages, and add and remove third-party libraries.","md",null,{},{"icon":34},{"description":1696,"title":31},"Learn how Go modules work for beginners, including go.mod, go.sum, go mod tidy, go get, importing your own packages, and common mistakes.","Bfwk_LrFmlQONmWn0vCWFRydYBJhSuaUkzpcGHAwVUU",[1699,1701],{"title":26,"path":27,"stem":28,"description":1700,"icon":29,"children":-1},"Create a module, write and run a Go program, format it, build it, and learn to read compiler errors.",{"title":36,"path":37,"stem":38,"description":1702,"icon":34,"children":-1},"Major versions, indirect requirements, replace, workspaces, internal packages, vendoring, and a safe dependency update workflow.",1794118096205]