code: func iterInterfaces(file *ast.File) <-chan namedInterface {
  	ch := make(chan namedInterface)
  	go func() {
  		for _, decl := range file.Decls {
  			gd, ok := decl.(*ast.GenDecl)
  			if !ok || gd.Tok != token.TYPE {
  				continue
  			}
  			for _, spec := range gd.Specs {
  				ts, ok := spec.(*ast.TypeSpec)
  				if !ok {
  					continue
  				}
  				it, ok := ts.Type.(*ast.InterfaceType)
  				if !ok {
  					continue
  				}
  
  				ch <- namedInterface{ts.Name, it}
  			}
  		}
  		close(ch)
  	}()
  	return ch
  }
docs: // Create an iterator over all interfaces in file.