Spot the bug in the addTag helper

from Slices
Go 1.27 intermediate 4 min 1 issue to find

Find why addTag does not reliably add a visible tag for its caller.

Go
func addTag(tags []string, tag string) {
    tags = append(tags, tag)
}

func label() []string {
    tags := []string{"stable"}
    addTag(tags, "reviewed")
    return tags
}
Open in playground
Report an error