// addIdentifiers adds identifier labels to the spelling dictionary.
addIdentifiers adds identifier labels to the spelling dictionary.
// addIdentifiers adds identifier labels to the spelling dictionary .
func addIdentifiers(spelling *hunspell.Spell, pkgs []*packages.Package) error {
	v := &adder{spelling: spelling}
	for _, p := range pkgs {
		for _, e := range strings.Split(p.String(), "/") {
			spelling.Add(e)
		}
		for _, f := range p.Syntax {
			ast.Walk(v, f)
		}
	}
	if v.failed != 0 {
		return errors.New("missed adding %d identifiers")
	}
	return nil
}
func addIdentifiers ( spelling * hunspell . Spell , pkgs [ ] * packages . Package ) error { v := & adder { spelling : spelling } for _ , p := range pkgs { for _ , e := range strings . Split ( p . String ( ) , " " ) { spelling . Add ( e ) } for _ , f := range p . Syntax { ast . Walk ( v , f ) } } if v . failed != 0 { return errors . New ( " " ) } return nil }
addIdentifiers adds identifier labels to the spelling dictionary.
addIdentifiers adds identifier labels to the spelling dictionary .