[{"data":1,"prerenderedAt":1824},["ShallowReactive",2],{"navigation_docs":3,"-advanced-go-advanced-testing-and-fuzzing":377,"-advanced-go-advanced-testing-and-fuzzing-surround":1819},[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":270,"body":379,"description":1811,"extension":1812,"links":1813,"meta":1814,"navigation":1815,"path":271,"seo":1816,"stem":272,"__hash__":1818},"docs\u002F6.advanced-go\u002F5.advanced-testing-and-fuzzing.md",{"type":380,"value":381,"toc":1796},"minimark",[382,388,393,397,416,420,423,426,437,440,444,447,575,578,600,603,607,610,613,616,620,832,846,850,857,864,867,871,874,891,894,898,901,1223,1230,1255,1258,1262,1279,1282,1285,1289,1292,1295,1299,1338,1342,1345,1755,1759,1776,1786,1789,1792],[383,384],"learning-lesson-meta",{"level":385,"prerequisites":386,"time":387},"Advanced","Testing, interfaces, files, HTTP, concurrency, and error handling","70–85 minutes",[389,390,392],"h2",{"id":391},"what-you-will-learn","What you will learn",[394,395,396],"p",{},"By the end of this lesson, you will be able to:",[398,399,400,404,407,410,413],"ul",{},[401,402,403],"li",{},"make time, randomness, storage, and network boundaries controllable;",[401,405,406],{},"choose fakes, integration tests, or real dependencies deliberately;",[401,408,409],{},"write safe parallel tests and reliable cleanup;",[401,411,412],{},"fuzz an input boundary with useful seed cases and properties;",[401,414,415],{},"understand what the race detector can and cannot prove.",[389,417,419],{"id":418},"test-behaviour-at-the-smallest-useful-boundary","Test behaviour at the smallest useful boundary",[394,421,422],{},"A unit test should isolate a meaningful behaviour, not every function call. An integration test should cross a boundary whose real implementation matters.",[394,424,425],{},"Examples:",[398,427,428,431,434],{},[401,429,430],{},"business rule with an in-memory fake repository: unit test;",[401,432,433],{},"SQL query and scan mapping against the target database: integration test;",[401,435,436],{},"complete HTTP route through middleware and repository: service-level test.",[394,438,439],{},"Use several layers. No single test style replaces the others.",[389,441,443],{"id":442},"make-dependencies-explicit","Make dependencies explicit",[394,445,446],{},"Time-dependent code becomes deterministic when the clock is an input:",[448,449,454],"pre",{"className":450,"code":451,"language":452,"meta":453,"style":453},"language-go shiki shiki-themes solarized-light material-theme one-dark-pro","type Clock interface {\n    Now() time.Time\n}\n\ntype realClock struct{}\n\nfunc (realClock) Now() time.Time { return time.Now() }\n","go","",[455,456,457,477,496,502,509,523,528],"code",{"__ignoreMap":453},[458,459,462,466,470,473],"span",{"class":460,"line":461},"line",1,[458,463,465],{"class":464},"sEOdo","type",[458,467,469],{"class":468},"snwKR"," Clock",[458,471,472],{"class":464}," interface",[458,474,476],{"class":475},"shFME"," {\n",[458,478,480,484,487,490,493],{"class":460,"line":479},2,[458,481,483],{"class":482},"sisdC","    Now",[458,485,486],{"class":475},"()",[458,488,489],{"class":468}," time",[458,491,492],{"class":475},".",[458,494,495],{"class":468},"Time\n",[458,497,499],{"class":460,"line":498},3,[458,500,501],{"class":475},"}\n",[458,503,505],{"class":460,"line":504},4,[458,506,508],{"emptyLinePlaceholder":507},true,"\n",[458,510,512,514,517,520],{"class":460,"line":511},5,[458,513,465],{"class":464},[458,515,516],{"class":468}," realClock",[458,518,519],{"class":464}," struct",[458,521,522],{"class":475},"{}\n",[458,524,526],{"class":460,"line":525},6,[458,527,508],{"emptyLinePlaceholder":507},[458,529,531,534,537,540,543,546,548,550,552,555,558,562,565,567,570,572],{"class":460,"line":530},7,[458,532,533],{"class":464},"func",[458,535,536],{"class":475}," (",[458,538,539],{"class":468},"realClock",[458,541,542],{"class":475},")",[458,544,545],{"class":482}," Now",[458,547,486],{"class":475},[458,549,489],{"class":468},[458,551,492],{"class":475},[458,553,554],{"class":468},"Time",[458,556,557],{"class":475}," {",[458,559,561],{"class":560},"s7Bcg"," return",[458,563,489],{"class":564},"s45-6",[458,566,492],{"class":475},[458,568,569],{"class":482},"Now",[458,571,486],{"class":475},[458,573,574],{"class":475}," }\n",[394,576,577],{},"For a small need, a function may be enough:",[448,579,581],{"className":450,"code":580,"language":452,"meta":453,"style":453},"type Now func() time.Time\n",[455,582,583],{"__ignoreMap":453},[458,584,585,587,589,592,594,596,598],{"class":460,"line":461},[458,586,465],{"class":464},[458,588,545],{"class":468},[458,590,591],{"class":464}," func",[458,593,486],{"class":475},[458,595,489],{"class":468},[458,597,492],{"class":475},[458,599,495],{"class":468},[394,601,602],{},"Do not introduce a large interface when one function describes the dependency.",[389,604,606],{"id":605},"fakes-versus-mocks","Fakes versus mocks",[394,608,609],{},"A fake implements behaviour with a simpler mechanism, such as an in-memory map. A mock commonly verifies expected interactions.",[394,611,612],{},"Prefer state or result assertions when possible. Tests that specify every internal call become fragile during harmless refactoring.",[394,614,615],{},"Use interaction assertions when the interaction itself is the contract—for example, an audit event must be written exactly once after a successful change.",[389,617,619],{"id":618},"cleanup-belongs-to-the-test","Cleanup belongs to the test",[448,621,623],{"className":450,"code":622,"language":452,"meta":453,"style":453},"func TestRepository(t *testing.T) {\n    directory := t.TempDir()\n    t.Setenv(\"APP_ENV\", \"test\")\n\n    resource := openTestResource(t, directory)\n    t.Cleanup(func() {\n        if err := resource.Close(); err != nil {\n            t.Errorf(\"close resource: %v\", err)\n        }\n    })\n}\n",[455,624,625,654,674,710,714,735,752,785,815,821,827],{"__ignoreMap":453},[458,626,627,629,632,635,639,642,645,647,650,652],{"class":460,"line":461},[458,628,533],{"class":464},[458,630,631],{"class":482}," TestRepository",[458,633,634],{"class":475},"(",[458,636,638],{"class":637},"syre3","t",[458,640,641],{"class":464}," *",[458,643,644],{"class":468},"testing",[458,646,492],{"class":475},[458,648,649],{"class":468},"T",[458,651,542],{"class":475},[458,653,476],{"class":475},[458,655,656,659,663,666,668,671],{"class":460,"line":479},[458,657,658],{"class":564},"    directory",[458,660,662],{"class":661},"su2KV"," :=",[458,664,665],{"class":564}," t",[458,667,492],{"class":475},[458,669,670],{"class":482},"TempDir",[458,672,673],{"class":475},"()\n",[458,675,676,679,681,684,686,690,694,696,699,702,705,707],{"class":460,"line":498},[458,677,678],{"class":564},"    t",[458,680,492],{"class":475},[458,682,683],{"class":482},"Setenv",[458,685,634],{"class":475},[458,687,689],{"class":688},"sED5a","\"",[458,691,693],{"class":692},"sVazx","APP_ENV",[458,695,689],{"class":688},[458,697,698],{"class":475},",",[458,700,701],{"class":688}," \"",[458,703,704],{"class":692},"test",[458,706,689],{"class":688},[458,708,709],{"class":475},")\n",[458,711,712],{"class":460,"line":504},[458,713,508],{"emptyLinePlaceholder":507},[458,715,716,719,721,724,726,728,730,733],{"class":460,"line":511},[458,717,718],{"class":564},"    resource",[458,720,662],{"class":661},[458,722,723],{"class":482}," openTestResource",[458,725,634],{"class":475},[458,727,638],{"class":564},[458,729,698],{"class":475},[458,731,732],{"class":564}," directory",[458,734,709],{"class":475},[458,736,737,739,741,744,746,748,750],{"class":460,"line":525},[458,738,678],{"class":564},[458,740,492],{"class":475},[458,742,743],{"class":482},"Cleanup",[458,745,634],{"class":475},[458,747,533],{"class":464},[458,749,486],{"class":475},[458,751,476],{"class":475},[458,753,754,757,760,762,765,767,770,773,775,779,783],{"class":460,"line":530},[458,755,756],{"class":560},"        if",[458,758,759],{"class":564}," err",[458,761,662],{"class":661},[458,763,764],{"class":564}," resource",[458,766,492],{"class":475},[458,768,769],{"class":482},"Close",[458,771,772],{"class":475},"();",[458,774,759],{"class":564},[458,776,778],{"class":777},"sRBoR"," !=",[458,780,782],{"class":781},"sp8Z5"," nil",[458,784,476],{"class":475},[458,786,788,791,793,796,798,800,803,807,809,811,813],{"class":460,"line":787},8,[458,789,790],{"class":564},"            t",[458,792,492],{"class":475},[458,794,795],{"class":482},"Errorf",[458,797,634],{"class":475},[458,799,689],{"class":688},[458,801,802],{"class":692},"close resource: ",[458,804,806],{"class":805},"st3jj","%v",[458,808,689],{"class":688},[458,810,698],{"class":475},[458,812,759],{"class":564},[458,814,709],{"class":475},[458,816,818],{"class":460,"line":817},9,[458,819,820],{"class":475},"        }\n",[458,822,824],{"class":460,"line":823},10,[458,825,826],{"class":475},"    })\n",[458,828,830],{"class":460,"line":829},11,[458,831,501],{"class":475},[394,833,834,836,837,839,840,842,843,845],{},[455,835,670],{},", ",[455,838,683],{},", and ",[455,841,743],{}," make ownership visible. Do not use ",[455,844,683],{}," in a test that runs in parallel because environment variables are process-global.",[389,847,849],{"id":848},"parallel-tests","Parallel tests",[394,851,852,853,856],{},"Call ",[455,854,855],{},"t.Parallel()"," only when the test and its subtests do not share mutable process-global state, ports, environment, database rows, or fixed files.",[394,858,859,860,863],{},"Give each case isolated inputs and resource names. The current Go language gives each iteration variable created by a ",[455,861,862],{},"for"," loop its own iteration value under modern module language versions, but explicit case parameters can still make intent clearer and help older codebases.",[394,865,866],{},"Parallelism is a test performance tool, not a correctness requirement.",[389,868,870],{"id":869},"golden-files","Golden files",[394,872,873],{},"A golden file stores expected complex output. It can be useful for generated code, formatted documents, or stable protocol output.",[398,875,876,882,885,888],{},[401,877,878,879,492],{},"Keep reviewable files under ",[455,880,881],{},"testdata",[401,883,884],{},"Normalise nondeterministic timestamps, IDs, and paths.",[401,886,887],{},"Make updates an explicit developer action.",[401,889,890],{},"Review golden diffs as carefully as source code.",[394,892,893],{},"Never let normal test execution silently replace expected output.",[389,895,897],{"id":896},"fuzz-properties-not-random-output","Fuzz properties, not random output",[394,899,900],{},"A fuzz test supplies seed inputs and a property that must always hold:",[448,902,904],{"className":450,"code":903,"language":452,"meta":453,"style":453},"func FuzzParseLessonID(f *testing.F) {\n    f.Add(\"lesson-42\")\n    f.Add(\"\")\n    f.Add(\"lesson-世界\")\n\n    f.Fuzz(func(t *testing.T, input string) {\n        id, err := ParseLessonID(input)\n        if err != nil {\n            return\n        }\n\n        encoded := id.String()\n        parsedAgain, err := ParseLessonID(encoded)\n        if err != nil {\n            t.Fatalf(\"valid output did not parse: %v\", err)\n        }\n        if parsedAgain != id {\n            t.Fatalf(\"round trip changed ID: %q -> %q\", id, parsedAgain)\n        }\n    })\n}\n",[455,905,906,931,952,967,986,990,1028,1049,1061,1066,1070,1074,1092,1113,1126,1153,1158,1172,1208,1213,1218],{"__ignoreMap":453},[458,907,908,910,913,915,918,920,922,924,927,929],{"class":460,"line":461},[458,909,533],{"class":464},[458,911,912],{"class":482}," FuzzParseLessonID",[458,914,634],{"class":475},[458,916,917],{"class":637},"f",[458,919,641],{"class":464},[458,921,644],{"class":468},[458,923,492],{"class":475},[458,925,926],{"class":468},"F",[458,928,542],{"class":475},[458,930,476],{"class":475},[458,932,933,936,938,941,943,945,948,950],{"class":460,"line":479},[458,934,935],{"class":564},"    f",[458,937,492],{"class":475},[458,939,940],{"class":482},"Add",[458,942,634],{"class":475},[458,944,689],{"class":688},[458,946,947],{"class":692},"lesson-42",[458,949,689],{"class":688},[458,951,709],{"class":475},[458,953,954,956,958,960,962,965],{"class":460,"line":498},[458,955,935],{"class":564},[458,957,492],{"class":475},[458,959,940],{"class":482},[458,961,634],{"class":475},[458,963,964],{"class":688},"\"\"",[458,966,709],{"class":475},[458,968,969,971,973,975,977,979,982,984],{"class":460,"line":504},[458,970,935],{"class":564},[458,972,492],{"class":475},[458,974,940],{"class":482},[458,976,634],{"class":475},[458,978,689],{"class":688},[458,980,981],{"class":692},"lesson-世界",[458,983,689],{"class":688},[458,985,709],{"class":475},[458,987,988],{"class":460,"line":511},[458,989,508],{"emptyLinePlaceholder":507},[458,991,992,994,996,999,1001,1003,1005,1007,1009,1011,1013,1015,1017,1020,1024,1026],{"class":460,"line":525},[458,993,935],{"class":564},[458,995,492],{"class":475},[458,997,998],{"class":482},"Fuzz",[458,1000,634],{"class":475},[458,1002,533],{"class":464},[458,1004,634],{"class":475},[458,1006,638],{"class":637},[458,1008,641],{"class":464},[458,1010,644],{"class":468},[458,1012,492],{"class":475},[458,1014,649],{"class":468},[458,1016,698],{"class":475},[458,1018,1019],{"class":637}," input",[458,1021,1023],{"class":1022},"sF6sA"," string",[458,1025,542],{"class":475},[458,1027,476],{"class":475},[458,1029,1030,1033,1035,1037,1039,1042,1044,1047],{"class":460,"line":530},[458,1031,1032],{"class":564},"        id",[458,1034,698],{"class":475},[458,1036,759],{"class":564},[458,1038,662],{"class":661},[458,1040,1041],{"class":482}," ParseLessonID",[458,1043,634],{"class":475},[458,1045,1046],{"class":564},"input",[458,1048,709],{"class":475},[458,1050,1051,1053,1055,1057,1059],{"class":460,"line":787},[458,1052,756],{"class":560},[458,1054,759],{"class":564},[458,1056,778],{"class":777},[458,1058,782],{"class":781},[458,1060,476],{"class":475},[458,1062,1063],{"class":460,"line":817},[458,1064,1065],{"class":560},"            return\n",[458,1067,1068],{"class":460,"line":823},[458,1069,820],{"class":475},[458,1071,1072],{"class":460,"line":829},[458,1073,508],{"emptyLinePlaceholder":507},[458,1075,1077,1080,1082,1085,1087,1090],{"class":460,"line":1076},12,[458,1078,1079],{"class":564},"        encoded",[458,1081,662],{"class":661},[458,1083,1084],{"class":564}," id",[458,1086,492],{"class":475},[458,1088,1089],{"class":482},"String",[458,1091,673],{"class":475},[458,1093,1095,1098,1100,1102,1104,1106,1108,1111],{"class":460,"line":1094},13,[458,1096,1097],{"class":564},"        parsedAgain",[458,1099,698],{"class":475},[458,1101,759],{"class":564},[458,1103,662],{"class":661},[458,1105,1041],{"class":482},[458,1107,634],{"class":475},[458,1109,1110],{"class":564},"encoded",[458,1112,709],{"class":475},[458,1114,1116,1118,1120,1122,1124],{"class":460,"line":1115},14,[458,1117,756],{"class":560},[458,1119,759],{"class":564},[458,1121,778],{"class":777},[458,1123,782],{"class":781},[458,1125,476],{"class":475},[458,1127,1129,1131,1133,1136,1138,1140,1143,1145,1147,1149,1151],{"class":460,"line":1128},15,[458,1130,790],{"class":564},[458,1132,492],{"class":475},[458,1134,1135],{"class":482},"Fatalf",[458,1137,634],{"class":475},[458,1139,689],{"class":688},[458,1141,1142],{"class":692},"valid output did not parse: ",[458,1144,806],{"class":805},[458,1146,689],{"class":688},[458,1148,698],{"class":475},[458,1150,759],{"class":564},[458,1152,709],{"class":475},[458,1154,1156],{"class":460,"line":1155},16,[458,1157,820],{"class":475},[458,1159,1161,1163,1166,1168,1170],{"class":460,"line":1160},17,[458,1162,756],{"class":560},[458,1164,1165],{"class":564}," parsedAgain",[458,1167,778],{"class":777},[458,1169,1084],{"class":564},[458,1171,476],{"class":475},[458,1173,1175,1177,1179,1181,1183,1185,1188,1191,1194,1196,1198,1200,1202,1204,1206],{"class":460,"line":1174},18,[458,1176,790],{"class":564},[458,1178,492],{"class":475},[458,1180,1135],{"class":482},[458,1182,634],{"class":475},[458,1184,689],{"class":688},[458,1186,1187],{"class":692},"round trip changed ID: ",[458,1189,1190],{"class":805},"%q",[458,1192,1193],{"class":692}," -> ",[458,1195,1190],{"class":805},[458,1197,689],{"class":688},[458,1199,698],{"class":475},[458,1201,1084],{"class":564},[458,1203,698],{"class":475},[458,1205,1165],{"class":564},[458,1207,709],{"class":475},[458,1209,1211],{"class":460,"line":1210},19,[458,1212,820],{"class":475},[458,1214,1216],{"class":460,"line":1215},20,[458,1217,826],{"class":475},[458,1219,1221],{"class":460,"line":1220},21,[458,1222,501],{"class":475},[394,1224,1225,1226,1229],{},"Run seed inputs as normal tests with ",[455,1227,1228],{},"go test",". Start active fuzzing with a command such as:",[448,1231,1235],{"className":1232,"code":1233,"language":1234,"meta":453,"style":453},"language-bash shiki shiki-themes solarized-light material-theme one-dark-pro","go test -fuzz=FuzzParseLessonID -fuzztime=30s .\u002Finternal\u002Flesson\n","bash",[455,1236,1237],{"__ignoreMap":453},[458,1238,1239,1242,1245,1249,1252],{"class":460,"line":461},[458,1240,452],{"class":1241},"sqRHY",[458,1243,1244],{"class":692}," test",[458,1246,1248],{"class":1247},"s2SA0"," -fuzz=FuzzParseLessonID",[458,1250,1251],{"class":1247}," -fuzztime=30s",[458,1253,1254],{"class":692}," .\u002Finternal\u002Flesson\n",[394,1256,1257],{},"Fuzzing writes minimised failing inputs into the seed corpus so normal future tests reproduce them. Do not fuzz code that causes uncontrolled network, filesystem, process, or resource side effects.",[389,1259,1261],{"id":1260},"race-detection","Race detection",[448,1263,1265],{"className":1232,"code":1264,"language":1234,"meta":453,"style":453},"go test -race .\u002F...\n",[455,1266,1267],{"__ignoreMap":453},[458,1268,1269,1271,1273,1276],{"class":460,"line":461},[458,1270,452],{"class":1241},[458,1272,1244],{"class":692},[458,1274,1275],{"class":1247}," -race",[458,1277,1278],{"class":692}," .\u002F...\n",[394,1280,1281],{},"The race detector reports races that occur in executed paths on supported platforms. A clean run does not prove a program has no races. Improve coverage of concurrent behaviour and combine the tool with clear ownership and synchronization.",[394,1283,1284],{},"Race-enabled builds have substantial overhead and are normally used in tests, CI, staging, or selected diagnostic environments rather than every production process.",[389,1286,1288],{"id":1287},"integration-tests","Integration tests",[394,1290,1291],{},"Use the real database engine when SQL dialect, constraints, transactions, or driver behaviour matters. Create isolated schemas\u002Fdatabases or unique records per test, and make setup\u002Fcleanup deterministic.",[394,1293,1294],{},"Avoid making every unit test start heavy infrastructure. Keep a fast core suite and a clearly invoked integration suite.",[389,1296,1298],{"id":1297},"common-mistakes","Common mistakes",[398,1300,1301,1308,1314,1320,1326,1332],{},[401,1302,1303,1307],{},[1304,1305,1306],"strong",{},"Mocking implementation details:"," harmless refactoring breaks many tests.",[401,1309,1310,1313],{},[1304,1311,1312],{},"Using real time and sleep:"," tests become slow and flaky.",[401,1315,1316,1319],{},[1304,1317,1318],{},"Sharing one mutable fake across parallel tests:"," tests race and contaminate each other.",[401,1321,1322,1325],{},[1304,1323,1324],{},"Fuzzing without a property:"," “did not panic” may be useful but often misses semantic corruption.",[401,1327,1328,1331],{},[1304,1329,1330],{},"Assuming race detection is a proof:"," unexecuted paths remain unobserved.",[401,1333,1334,1337],{},[1304,1335,1336],{},"Using a different database for convenience:"," engine-specific production behaviour is never tested.",[389,1339,1341],{"id":1340},"practice","Practice",[394,1343,1344],{},"Fuzz a parser for a comma-separated list of lesson IDs. The parser must never panic, must reject empty items, must enforce an item limit, and must round-trip every accepted list through its formatter.",[1346,1347,1348],"accordion",{},[1349,1350,1353,1752],"accordion-item",{"icon":1351,"label":1352},"i-lucide-lightbulb","Show fuzz target outline",[448,1354,1356],{"className":450,"code":1355,"language":452,"meta":453,"style":453},"func FuzzLessonIDList(f *testing.F) {\n    f.Add(\"lesson-1,lesson-2\")\n    f.Add(\"\")\n    f.Add(\"lesson-1,,lesson-3\")\n\n    f.Fuzz(func(t *testing.T, input string) {\n        ids, err := ParseLessonIDList(input, 100)\n        if err != nil {\n            return\n        }\n        if len(ids) == 0 || len(ids) > 100 {\n            t.Fatalf(\"accepted invalid count: %d\", len(ids))\n        }\n\n        formatted := FormatLessonIDList(ids)\n        roundTrip, err := ParseLessonIDList(formatted, 100)\n        if err != nil {\n            t.Fatalf(\"formatted value did not parse: %v\", err)\n        }\n        if !slices.Equal(ids, roundTrip) {\n            t.Fatalf(\"round trip changed values: %v -> %v\", ids, roundTrip)\n        }\n    })\n}\n",[455,1357,1358,1381,1400,1414,1433,1437,1471,1497,1509,1513,1517,1555,1586,1590,1594,1610,1634,1646,1671,1675,1703,1737,1742,1747],{"__ignoreMap":453},[458,1359,1360,1362,1365,1367,1369,1371,1373,1375,1377,1379],{"class":460,"line":461},[458,1361,533],{"class":464},[458,1363,1364],{"class":482}," FuzzLessonIDList",[458,1366,634],{"class":475},[458,1368,917],{"class":637},[458,1370,641],{"class":464},[458,1372,644],{"class":468},[458,1374,492],{"class":475},[458,1376,926],{"class":468},[458,1378,542],{"class":475},[458,1380,476],{"class":475},[458,1382,1383,1385,1387,1389,1391,1393,1396,1398],{"class":460,"line":479},[458,1384,935],{"class":564},[458,1386,492],{"class":475},[458,1388,940],{"class":482},[458,1390,634],{"class":475},[458,1392,689],{"class":688},[458,1394,1395],{"class":692},"lesson-1,lesson-2",[458,1397,689],{"class":688},[458,1399,709],{"class":475},[458,1401,1402,1404,1406,1408,1410,1412],{"class":460,"line":498},[458,1403,935],{"class":564},[458,1405,492],{"class":475},[458,1407,940],{"class":482},[458,1409,634],{"class":475},[458,1411,964],{"class":688},[458,1413,709],{"class":475},[458,1415,1416,1418,1420,1422,1424,1426,1429,1431],{"class":460,"line":504},[458,1417,935],{"class":564},[458,1419,492],{"class":475},[458,1421,940],{"class":482},[458,1423,634],{"class":475},[458,1425,689],{"class":688},[458,1427,1428],{"class":692},"lesson-1,,lesson-3",[458,1430,689],{"class":688},[458,1432,709],{"class":475},[458,1434,1435],{"class":460,"line":511},[458,1436,508],{"emptyLinePlaceholder":507},[458,1438,1439,1441,1443,1445,1447,1449,1451,1453,1455,1457,1459,1461,1463,1465,1467,1469],{"class":460,"line":525},[458,1440,935],{"class":564},[458,1442,492],{"class":475},[458,1444,998],{"class":482},[458,1446,634],{"class":475},[458,1448,533],{"class":464},[458,1450,634],{"class":475},[458,1452,638],{"class":637},[458,1454,641],{"class":464},[458,1456,644],{"class":468},[458,1458,492],{"class":475},[458,1460,649],{"class":468},[458,1462,698],{"class":475},[458,1464,1019],{"class":637},[458,1466,1023],{"class":1022},[458,1468,542],{"class":475},[458,1470,476],{"class":475},[458,1472,1473,1476,1478,1480,1482,1485,1487,1489,1491,1495],{"class":460,"line":530},[458,1474,1475],{"class":564},"        ids",[458,1477,698],{"class":475},[458,1479,759],{"class":564},[458,1481,662],{"class":661},[458,1483,1484],{"class":482}," ParseLessonIDList",[458,1486,634],{"class":475},[458,1488,1046],{"class":564},[458,1490,698],{"class":475},[458,1492,1494],{"class":1493},"sAJzr"," 100",[458,1496,709],{"class":475},[458,1498,1499,1501,1503,1505,1507],{"class":460,"line":787},[458,1500,756],{"class":560},[458,1502,759],{"class":564},[458,1504,778],{"class":777},[458,1506,782],{"class":781},[458,1508,476],{"class":475},[458,1510,1511],{"class":460,"line":817},[458,1512,1065],{"class":560},[458,1514,1515],{"class":460,"line":823},[458,1516,820],{"class":475},[458,1518,1519,1521,1524,1526,1529,1531,1534,1537,1540,1542,1544,1546,1548,1551,1553],{"class":460,"line":829},[458,1520,756],{"class":560},[458,1522,1523],{"class":482}," len",[458,1525,634],{"class":475},[458,1527,1528],{"class":564},"ids",[458,1530,542],{"class":475},[458,1532,1533],{"class":777}," ==",[458,1535,1536],{"class":1493}," 0",[458,1538,1539],{"class":777}," ||",[458,1541,1523],{"class":482},[458,1543,634],{"class":475},[458,1545,1528],{"class":564},[458,1547,542],{"class":475},[458,1549,1550],{"class":777}," >",[458,1552,1494],{"class":1493},[458,1554,476],{"class":475},[458,1556,1557,1559,1561,1563,1565,1567,1570,1573,1575,1577,1579,1581,1583],{"class":460,"line":1076},[458,1558,790],{"class":564},[458,1560,492],{"class":475},[458,1562,1135],{"class":482},[458,1564,634],{"class":475},[458,1566,689],{"class":688},[458,1568,1569],{"class":692},"accepted invalid count: ",[458,1571,1572],{"class":805},"%d",[458,1574,689],{"class":688},[458,1576,698],{"class":475},[458,1578,1523],{"class":482},[458,1580,634],{"class":475},[458,1582,1528],{"class":564},[458,1584,1585],{"class":475},"))\n",[458,1587,1588],{"class":460,"line":1094},[458,1589,820],{"class":475},[458,1591,1592],{"class":460,"line":1115},[458,1593,508],{"emptyLinePlaceholder":507},[458,1595,1596,1599,1601,1604,1606,1608],{"class":460,"line":1128},[458,1597,1598],{"class":564},"        formatted",[458,1600,662],{"class":661},[458,1602,1603],{"class":482}," FormatLessonIDList",[458,1605,634],{"class":475},[458,1607,1528],{"class":564},[458,1609,709],{"class":475},[458,1611,1612,1615,1617,1619,1621,1623,1625,1628,1630,1632],{"class":460,"line":1155},[458,1613,1614],{"class":564},"        roundTrip",[458,1616,698],{"class":475},[458,1618,759],{"class":564},[458,1620,662],{"class":661},[458,1622,1484],{"class":482},[458,1624,634],{"class":475},[458,1626,1627],{"class":564},"formatted",[458,1629,698],{"class":475},[458,1631,1494],{"class":1493},[458,1633,709],{"class":475},[458,1635,1636,1638,1640,1642,1644],{"class":460,"line":1160},[458,1637,756],{"class":560},[458,1639,759],{"class":564},[458,1641,778],{"class":777},[458,1643,782],{"class":781},[458,1645,476],{"class":475},[458,1647,1648,1650,1652,1654,1656,1658,1661,1663,1665,1667,1669],{"class":460,"line":1174},[458,1649,790],{"class":564},[458,1651,492],{"class":475},[458,1653,1135],{"class":482},[458,1655,634],{"class":475},[458,1657,689],{"class":688},[458,1659,1660],{"class":692},"formatted value did not parse: ",[458,1662,806],{"class":805},[458,1664,689],{"class":688},[458,1666,698],{"class":475},[458,1668,759],{"class":564},[458,1670,709],{"class":475},[458,1672,1673],{"class":460,"line":1210},[458,1674,820],{"class":475},[458,1676,1677,1679,1682,1685,1687,1690,1692,1694,1696,1699,1701],{"class":460,"line":1215},[458,1678,756],{"class":560},[458,1680,1681],{"class":777}," !",[458,1683,1684],{"class":564},"slices",[458,1686,492],{"class":475},[458,1688,1689],{"class":482},"Equal",[458,1691,634],{"class":475},[458,1693,1528],{"class":564},[458,1695,698],{"class":475},[458,1697,1698],{"class":564}," roundTrip",[458,1700,542],{"class":475},[458,1702,476],{"class":475},[458,1704,1705,1707,1709,1711,1713,1715,1718,1720,1722,1724,1726,1728,1731,1733,1735],{"class":460,"line":1220},[458,1706,790],{"class":564},[458,1708,492],{"class":475},[458,1710,1135],{"class":482},[458,1712,634],{"class":475},[458,1714,689],{"class":688},[458,1716,1717],{"class":692},"round trip changed values: ",[458,1719,806],{"class":805},[458,1721,1193],{"class":692},[458,1723,806],{"class":805},[458,1725,689],{"class":688},[458,1727,698],{"class":475},[458,1729,1730],{"class":564}," ids",[458,1732,698],{"class":475},[458,1734,1698],{"class":564},[458,1736,709],{"class":475},[458,1738,1740],{"class":460,"line":1739},22,[458,1741,820],{"class":475},[458,1743,1745],{"class":460,"line":1744},23,[458,1746,826],{"class":475},[458,1748,1750],{"class":460,"line":1749},24,[458,1751,501],{"class":475},[394,1753,1754],{},"The parser must bound work before allocating an unbounded number of results. Add the fuzz test beside ordinary unit tests for specific error classifications and boundary counts.",[389,1756,1758],{"id":1757},"summary","Summary",[398,1760,1761,1764,1767,1770,1773],{},[401,1762,1763],{},"Test at unit, integration, and service boundaries according to the behaviour being verified.",[401,1765,1766],{},"Make time and other nondeterministic dependencies explicit.",[401,1768,1769],{},"Prefer behaviour assertions over exhaustive internal-call expectations.",[401,1771,1772],{},"Fuzz stable properties at bounded input boundaries.",[401,1774,1775],{},"Race detection observes executed races; sound ownership remains essential.",[394,1777,1778,1779,492],{},"Official reference: ",[1780,1781,1785],"a",{"href":1782,"rel":1783},"https:\u002F\u002Fgo.dev\u002Fdoc\u002Fsecurity\u002Ffuzz\u002F",[1784],"nofollow","Go fuzzing",[1787,1788],"learning-lesson-complete",{},[1790,1791],"learning-lesson-navigation",{"next":276,"next-label":275,"previous":266,"previous-label":265},[1793,1794,1795],"style",{},"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 .shFME, html code.shiki .shFME{--shiki-light:#657B83;--shiki-default:#89DDFF;--shiki-dark:#ABB2BF}html pre.shiki code .sisdC, html code.shiki .sisdC{--shiki-light:#268BD2;--shiki-default:#82AAFF;--shiki-dark:#61AFEF}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 .s45-6, html code.shiki .s45-6{--shiki-light:#268BD2;--shiki-default:#EEFFFF;--shiki-dark:#E06C75}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 .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 .su2KV, html code.shiki .su2KV{--shiki-light:#859900;--shiki-default:#89DDFF;--shiki-dark:#E5C07B}html pre.shiki code .sED5a, html code.shiki .sED5a{--shiki-light:#2AA198;--shiki-default:#89DDFF;--shiki-dark:#98C379}html pre.shiki code .sVazx, html code.shiki .sVazx{--shiki-light:#2AA198;--shiki-default:#C3E88D;--shiki-dark:#98C379}html pre.shiki code .sRBoR, html code.shiki .sRBoR{--shiki-light:#859900;--shiki-default:#89DDFF;--shiki-dark:#56B6C2}html pre.shiki code .sp8Z5, html code.shiki .sp8Z5{--shiki-light:#B58900;--shiki-default:#89DDFF;--shiki-dark:#D19A66}html pre.shiki code .st3jj, html code.shiki .st3jj{--shiki-light:#CB4B16;--shiki-default:#F07178;--shiki-dark:#D19A66}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 .sqRHY, html code.shiki .sqRHY{--shiki-light:#268BD2;--shiki-default:#FFCB6B;--shiki-dark:#61AFEF}html pre.shiki code .s2SA0, html code.shiki .s2SA0{--shiki-light:#CB4B16;--shiki-default:#C3E88D;--shiki-dark:#D19A66}html pre.shiki code .sAJzr, html code.shiki .sAJzr{--shiki-light:#D33682;--shiki-default:#F78C6C;--shiki-dark:#D19A66}",{"title":453,"searchDepth":479,"depth":479,"links":1797},[1798,1799,1800,1801,1802,1803,1804,1805,1806,1807,1808,1809,1810],{"id":391,"depth":479,"text":392},{"id":418,"depth":479,"text":419},{"id":442,"depth":479,"text":443},{"id":605,"depth":479,"text":606},{"id":618,"depth":479,"text":619},{"id":848,"depth":479,"text":849},{"id":869,"depth":479,"text":870},{"id":896,"depth":479,"text":897},{"id":1260,"depth":479,"text":1261},{"id":1287,"depth":479,"text":1288},{"id":1297,"depth":479,"text":1298},{"id":1340,"depth":479,"text":1341},{"id":1757,"depth":479,"text":1758},"Control dependencies, test properties and boundaries, fuzz parsers, and keep suites deterministic.","md",null,{},{"icon":273},{"description":1817,"title":270},"Learn advanced Go testing with fakes, clocks, cleanup, parallel tests, golden files, fuzzing, race detection, and integration boundaries.","q4d4NYnP11dfl7oNtAtOmcZS15yr0lackVYvxauvC1U",[1820,1822],{"title":265,"path":266,"stem":267,"description":1821,"icon":268,"children":-1},"Measure representative performance, locate bottlenecks, compare changes, and avoid misleading microbenchmarks.",{"title":275,"path":276,"stem":277,"description":1823,"icon":48,"children":-1},"Design bounded pipelines with cancellation, backpressure, error propagation, and explicit ownership.",1794118103347]