|
|
|
|
|
by NateDad
4258 days ago
|
|
I don't understand your problem with errors versus maps.... they're actually the exact same code pattern: val, ok := m["foo"]
if !ok {
// handle not found
}
// good path
and val, err := m("foo")
if err != nil {
// handle err
}
// good path
|
|