3 ms·
> Consider something like filepath.Walk in go; you give it a function that gets called for every file and directory in the root of your choosing. They don't cal
by apta 8y ago
> Consider something like filepath.Walk in go; you give it a function that gets called for every file and directory in the root of your choosing. They don't call it a visitor, though, they call it a "walk function".
The ironic thing is that golang doesn't have an even better construct for this kind of pattern, namely pattern matching.