Hacker News new | ask | show | jobs
by tiltowait 211 days ago
You can test for existence:

    val, ok := my_map[123]
    if ok {
        ...
    }
https://go.dev/blog/maps#working-with-maps