- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for importSpec (0.18 sec)
-
src/cmd/fix/gotypes.go
// First find the import spec. var importSpec *ast.ImportSpec walk(f, func(n any) { if importSpec != nil { return } spec, ok := n.(*ast.ImportSpec) if !ok { return } path, err := strconv.Unquote(spec.Path.Value) if err != nil { return } if path == "golang.org/x/tools/go/exact" { importSpec = spec } }) if importSpec == nil { return false }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 1.7K bytes - Viewed (0) -
src/go/ast/import.go
} func importPath(s Spec) string { t, err := strconv.Unquote(s.(*ImportSpec).Path.Value) if err == nil { return t } return "" } func importName(s Spec) string { n := s.(*ImportSpec).Name if n == nil { return "" } return n.Name } func importComment(s Spec) string { c := s.(*ImportSpec).Comment if c == nil { return "" } return c.Text() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 5.7K bytes - Viewed (0) -
src/go/ast/commentmap_test.go
var res = map[string]string{ " 5: *ast.File": "the very first comment\npackage p\n", " 5: *ast.Ident": " the name is p\n", " 8: *ast.GenDecl": "imports\n", " 9: *ast.ImportSpec": "bytes\n", "10: *ast.ImportSpec": "fmt\n", "16: *ast.GenDecl": "T\nalso associated with T\n", "17: *ast.Field": "associated with a, b, c\n", "19: *ast.Field": "associated with x, y\nfloat values\n",
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 09 15:35:30 UTC 2022 - 3.9K bytes - Viewed (0) -
api/go1.22.txt
pkg go/types, method (*Alias) String() string #63223 pkg go/types, method (*Alias) Underlying() Type #63223 pkg go/types, method (*Info) PkgNameOf(*ast.ImportSpec) *PkgName #62037 pkg go/types, method (Checker) PkgNameOf(*ast.ImportSpec) *PkgName #62037 pkg go/types, type Alias struct #63223 pkg go/types, type Info struct, FileVersions map[*ast.File]string #62605 pkg go/version, func Compare(string, string) int #62039
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 24 20:54:27 UTC 2024 - 7.7K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/ast/inspector/typeof.go
case *ast.GenDecl: return 1 << nGenDecl case *ast.GoStmt: return 1 << nGoStmt case *ast.Ident: return 1 << nIdent case *ast.IfStmt: return 1 << nIfStmt case *ast.ImportSpec: return 1 << nImportSpec case *ast.IncDecStmt: return 1 << nIncDecStmt case *ast.IndexExpr: return 1 << nIndexExpr case *ast.IndexListExpr: return 1 << nIndexListExpr case *ast.InterfaceType:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:28:13 UTC 2023 - 4.8K bytes - Viewed (0) -
src/go/ast/scope.go
func (obj *Object) Pos() token.Pos { name := obj.Name switch d := obj.Decl.(type) { case *Field: for _, n := range d.Names { if n.Name == name { return n.Pos() } } case *ImportSpec: if d.Name != nil && d.Name.Name == name { return d.Name.Pos() } return d.Path.Pos() case *ValueSpec: for _, n := range d.Names { if n.Name == name { return n.Pos() } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 28 21:32:41 UTC 2024 - 4.6K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/mkbuiltin.go
} fmt.Fprintf(w, "{%q, funcTag, %d},\n", decl.Name.Name, interner.intern(decl.Type)) case *ast.GenDecl: if decl.Tok == token.IMPORT { if len(decl.Specs) != 1 || decl.Specs[0].(*ast.ImportSpec).Path.Value != "\"unsafe\"" { log.Fatal("runtime cannot import other package") } continue } if decl.Tok != token.VAR { log.Fatal("unhandled declaration kind", decl.Tok) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jan 26 21:56:49 UTC 2023 - 6K bytes - Viewed (0) -
src/go/ast/walk.go
case *RangeStmt: if n.Key != nil { Walk(v, n.Key) } if n.Value != nil { Walk(v, n.Value) } Walk(v, n.X) Walk(v, n.Body) // Declarations case *ImportSpec: if n.Doc != nil { Walk(v, n.Doc) } if n.Name != nil { Walk(v, n.Name) } Walk(v, n.Path) if n.Comment != nil { Walk(v, n.Comment) } case *ValueSpec:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 16:34:10 UTC 2024 - 6.4K bytes - Viewed (0) -
src/go/doc/exports.go
r.filterType(nil, t.Key) r.filterType(nil, t.Value) case *ast.ChanType: r.filterType(nil, t.Value) } } func (r *reader) filterSpec(spec ast.Spec) bool { switch s := spec.(type) { case *ast.ImportSpec: // always keep imports so we can collect them return true case *ast.ValueSpec: s.Values = filterExprList(s.Values, token.IsExported, true) if len(s.Values) > 0 || s.Type == nil && len(s.Values) == 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 01 18:18:07 UTC 2022 - 8.5K bytes - Viewed (0)