diff options
| author | Jeff Carr <[email protected]> | 2024-12-01 16:43:08 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-01 16:43:08 -0600 |
| commit | 7a1c1e318045165f14894ce4a12e3105a68eb3cc (patch) | |
| tree | ecd8e374eb6aa26dec8cad2a629a2bbcce19a242 | |
| parent | 2c8a813b714020681df1261af8937c1a106937f5 (diff) | |
kill nil panic possibilityv0.0.8
| -rw-r--r-- | sort.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -319,6 +319,10 @@ func iterDeleteWithCopy(w io.Writer, names map[string]string) { func iterFind(w io.Writer, names map[string]string) { fmt.Fprintln(w, "// find a dependancy by the go path") fmt.Fprintln(w, "func (all *"+names["Bases"]+") FindBy"+names["append"]+"(s string) *"+names["Base"]+" {") + fmt.Fprintln(w, " if all == nil {") + fmt.Fprintln(w, " return nil") + fmt.Fprintln(w, " }") + fmt.Fprintln(w, "") if sortmap["lock"] == "all" { fmt.Fprintln(w, " "+names["lock"]+".Lock.RLock()") fmt.Fprintln(w, " defer "+names["lock"]+".Lock.RUnlock()") |
