In my code filepath.Walk walks over directories, in the examples all directories are called dir
1. dir
2. dir
10. dir
100. dir
etc
when walking over the directories it will see
1. dir
10. dir
2. dir
how do i make my own walkFunc so it goes trough directories like this,
1. dir
2. dir
10. dir
As mentioned in the docs filepath.Walk
traverses entries in lexical order.
If you want to list them in a different order, you can either:
filepath.Walk
, put all the paths into a slice, and sort it as desired.