Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for NewIdent (0.08 sec)

  1. cmd/preferredimports/preferredimports.go

    							a.failed = true
    						}
    						replacements[importName] = alias
    						if imp.Name != nil {
    							imp.Name.Name = alias
    						} else {
    							imp.Name = ast.NewIdent(alias)
    						}
    					}
    					break
    				}
    			}
    
    			if len(replacements) > 0 {
    				if *confirm {
    					fmt.Printf("%sReplacing imports with aliases in file %s\n", logPrefix, pathToFile)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:44 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  2. src/go/types/struct.go

    			pos := f.Type.Pos() // position of type, for errors
    			name := embeddedFieldIdent(f.Type)
    			if name == nil {
    				check.errorf(f.Type, InvalidSyntaxTree, "embedded field type %s has no name", f.Type)
    				name = ast.NewIdent("_")
    				name.NamePos = pos
    				addInvalid(name)
    				continue
    			}
    			add(name, true) // struct{p.T} field has position of T
    
    			// Because we have a name, typ must be of the form T or *T, where T is the name
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 6.1K bytes
    - Viewed (0)
Back to top