func WalkExamples(p *doc.Package, fn func(id string, ex *doc.Example)) {
	for _, ex := range p.Examples {
		fn("", ex)
	}
	for _, f := range p.Funcs {
		for _, ex := range f.Examples {
			fn(f.Name, ex)
		}
	}
	for _, t := range p.Types {
		for _, ex := range t.Examples {
			fn(t.Name, ex)
		}
		for _, f := range t.Funcs {
			for _, ex := range f.Examples {
				fn(f.Name, ex)
			}
		}
		for _, m := range t.Methods {
			for _, ex := range m.Examples {
				fn(t.Name+"."+m.Name, ex)
			}
		}
	}
}
// WalkExamples calls fn for each Example in p,
// setting id to the name of the parent structure.
WalkExamples calls fn for each Example in p,
setting id to the name of the parent structure.
// WalkExamples calls fn for each Example in p // setting id to the name of the parent structure .
func WalkExamples(p *doc.Package, fn func(id string, ex *doc.Example)) {
	for _, ex := range p.Examples {
		fn("", ex)
	}
	for _, f := range p.Funcs {
		for _, ex := range f.Examples {
			fn(f.Name, ex)
		}
	}
	for _, t := range p.Types {
		for _, ex := range t.Examples {
			fn(t.Name, ex)
		}
		for _, f := range t.Funcs {
			for _, ex := range f.Examples {
				fn(f.Name, ex)
			}
		}
		for _, m := range t.Methods {
			for _, ex := range m.Examples {
				fn(t.Name+"."+m.Name, ex)
			}
		}
	}
}
func WalkExamples ( p * doc . Package , fn func ( id string , ex * doc . Example ) ) { for _ , ex := range p . Examples { fn ( " " , ex ) } for _ , f := range p . Funcs { for _ , ex := range f . Examples { fn ( f . Name , ex ) } } for _ , t := range p . Types { for _ , ex := range t . Examples { fn ( t . Name , ex ) } for _ , f := range t . Funcs { for _ , ex := range f . Examples { fn ( f . Name , ex ) } } for _ , m := range t . Methods { for _ , ex := range m . Examples { fn ( t . Name + " " + m . Name , ex ) } } } }
WalkExamples calls fn for each Example in p,
setting id to the name of the parent structure.
WalkExamples calls fn for each Example in p setting id to the name of the parent structure .