Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ReadImports (0.07 sec)

  1. src/cmd/go/internal/modcmd/vendor.go

    		}
    	}
    	if strings.HasSuffix(info.Name(), ".go") {
    		f, err := fsys.Open(filepath.Join(dir, info.Name()))
    		if err != nil {
    			base.Fatal(err)
    		}
    		defer f.Close()
    
    		content, err := imports.ReadImports(f, false, nil)
    		if err == nil && !imports.ShouldBuild(content, imports.AnyTags()) {
    			// The file is explicitly tagged "ignore", so it can't affect the build.
    			// Leave it out.
    			return false
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 14 14:19:59 UTC 2024
    - 14.5K bytes
    - Viewed (0)
Back to top