1313 let backText = ' blog' ;
1414 let backHref = ' /blog' ;
1515
16- let mapOfMutexes = `
16+ let mapOfMutexes = `
1717import (
1818 "fmt"
1919 "sync"
@@ -86,9 +86,9 @@ func (me *mentry) Unlock() {
8686 e.el.Unlock()
8787
8888}
89- `
89+ ` ;
9090
91- let mapOfMutexesTests = `
91+ let mapOfMutexesTests = `
9292import (
9393 "math/rand"
9494 "strconv"
@@ -172,11 +172,11 @@ func BenchmarkM(b *testing.B) {
172172
173173}
174174
175- `
175+ ` ;
176176
177- let use = ` bundlePath := fmt.Sprintf("%s/%s/bundles/%s", BUNDLE_SCHEMA, ownerEntityID, bundleID)
177+ let use = ` bundlePath := fmt.Sprintf("%s/%s/bundles/%s", BUNDLE_SCHEMA, ownerEntityID, bundleID)
178178bundleLock := bundleMapOfMu.Lock(bundlePath)
179- defer bundleLock.Unlock() `
179+ defer bundleLock.Unlock() ` ;
180180 </script >
181181
182182<PageLayout {backHref } {backText } {title } {date }>
@@ -202,28 +202,25 @@ defer bundleLock.Unlock()`
202202
203203 <PageParagraph >
204204 In some cases, you can find gems on Stack Overflow. However, rarely do the gems come with tests.
205- The following map of mutexes code was pulled from this <a class =" text-primary-500"
205+ The following map of mutexes code was pulled from this <a
206+ class =" text-primary-500"
206207 href =" https://stackoverflow.com/questions/40931373/how-to-gc-a-map-of-mutexes-in-go"
207208 target =" _blank" >SO</a
208- > question and provided by <a class =" text-primary-500" href =" https://stackoverflow.com/users/961810/brad-peabody" target =" _blank" >Brad Peabody</a >.
209+ >
210+ question and provided by
211+ <a
212+ class =" text-primary-500"
213+ href =" https://stackoverflow.com/users/961810/brad-peabody"
214+ target =" _blank" >Brad Peabody</a
215+ >.
209216 </PageParagraph >
210217
211-
212-
213- <PageParagraph >
214- Map Of Mutexes:
215- </PageParagraph >
218+ <PageParagraph >Map Of Mutexes:</PageParagraph >
216219 <Code code ={mapOfMutexes } lang =" go" ></Code >
217220
218- <PageParagraph >
219- Map Of Mutexes Tests:
220- </PageParagraph >
221+ <PageParagraph >Map Of Mutexes Tests:</PageParagraph >
221222 <Code code ={mapOfMutexesTests } lang =" go" ></Code >
222223
223- <PageParagraph >
224- Locking A Bundle:
225- </PageParagraph >
224+ <PageParagraph >Locking A Bundle:</PageParagraph >
226225 <Code code ={use } lang =" go" ></Code >
227-
228-
229226</PageLayout >
0 commit comments