Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for depDecls (0.13 sec)

  1. src/go/doc/example.go

    	// Synthesize main function.
    	funcDecl := &ast.FuncDecl{
    		Name: ast.NewIdent("main"),
    		Type: f.Type,
    		Body: body,
    	}
    
    	decls := make([]ast.Decl, 0, 2+len(depDecls))
    	decls = append(decls, importDecl)
    	decls = append(decls, depDecls...)
    	decls = append(decls, funcDecl)
    
    	slices.SortFunc(decls, func(a, b ast.Decl) int {
    		return cmp.Compare(a.Pos(), b.Pos())
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 21.4K bytes
    - Viewed (0)
Back to top