func findThing(things []Thing, name string) *Thing { for i := range things { if things[i].Name == name { return &things[i] } } return nil }
if location := findThing(things, name); location != -1 { things[location].Name = "updated" }
[0] https://go.dev/play/p/Q2ntuaugbGQ