This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Range runs the given closure on each element of the given list or map. If | |
// the directive identifies a map, idx will be 0. The index or key will be set | |
// to the appropriate values for a list or map, respectively, and the other | |
// will be zero. | |
// | |
// Example: | |
// config.Range("servers", func(i int, _ string, n node) { | |
// fmt.Printf("server[%d] = %q\n", i, n.(Scalar).String()) | |
// }) | |
// config.Range("users", func(_ int, name string, n node) { |