Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 59 for relative (0.96 sec)

  1. src/cmd/go/testdata/script/run_issue51125.txt

    # Relative import paths (a holdover from GOPATH) were accidentally allowed in module mode.
    
    cd $WORK
    
    # Relative imports should not be allowed with a go.mod file.
    
    ! go run driver.go
    stderr '^driver.go:3:8: "./mypkg" is relative, but relative import paths are not supported in module mode$'
    
    go list -e -f '{{with .Error}}{{.}}{{end}}' -deps driver.go
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 16 19:10:58 UTC 2022
    - 1.3K bytes
    - Viewed (0)
  2. src/cmd/go/testdata/script/gopath_paths.txt

    env GOPATH=.
    ! go build go-cmd-test/helloworld.go
    stderr 'GOPATH entry is relative'
    
    # It should still be rejected if the requested package can be
    # found using another entry.
    env GOPATH=${:}$ORIG_GOPATH${:}.
    ! go build go-cmd-test
    stderr 'GOPATH entry is relative'
    
    # GOPATH cannot be a relative subdirectory of the working directory.
    env ORIG_GOPATH
    stdout 'ORIG_GOPATH='$WORK[/\\]gopath
    cd $WORK
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 18 21:48:52 UTC 2019
    - 1.1K bytes
    - Viewed (0)
  3. src/cmd/go/testdata/script/gopath_local.txt

    [short] skip
    
    # Imports should be resolved relative to the source file.
    go build testdata/local/easy.go
    exec ./easy$GOEXE
    stdout '^easysub\.Hello'
    
    # Ignored files should be able to import the package built from
    # non-ignored files in the same directory.
    go build -o easysub$GOEXE testdata/local/easysub/main.go
    exec ./easysub$GOEXE
    stdout '^easysub\.Hello'
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 24 21:26:10 UTC 2022
    - 2.9K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/syntax/pos.go

    }
    
    // A PosBase represents the base for relative position information:
    // At position pos, the relative position is filename:line:col.
    type PosBase struct {
    	pos       Pos
    	filename  string
    	line, col uint32
    	trimmed   bool // whether -trimpath has been applied
    }
    
    // NewFileBase returns a new PosBase for the given filename.
    // A file PosBase's position is relative to itself, with the
    // position being filename:1:1.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 20:44:57 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  5. src/cmd/go/testdata/script/list_goroot_symlink.txt

    [GOOS:ios] skip 'Lstat on ios does not conform to POSIX pathname resolution; see #59586'
    
    # Ensure that the relative path to $WORK/lib/goroot/src from $PWD is a different
    # number of ".." hops than the relative path to it from $WORK/share/goroot/src.
    
    cd $WORK
    
    # Construct a fake GOROOT in $WORK/lib/goroot whose src directory is a symlink
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 14 17:01:07 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  6. src/cmd/go/internal/load/search.go

    			return func(p *Package) bool { return p.Dir == dir }
    		}
    		matchPath := pkgpattern.MatchPattern(pattern)
    		return func(p *Package) bool {
    			// Compute relative path to dir and see if it matches the pattern.
    			rel, err := filepath.Rel(dir, p.Dir)
    			if err != nil {
    				// Cannot make relative - e.g. different drive letters on Windows.
    				return false
    			}
    			rel = filepath.ToSlash(rel)
    			if rel == ".." || strings.HasPrefix(rel, "../") {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 27 16:43:40 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  7. src/cmd/go/internal/base/path.go

    		cwd = UncachedCwd()
    	})
    	return cwd
    }
    
    // ShortPath returns an absolute or relative name for path, whatever is shorter.
    func ShortPath(path string) string {
    	if rel, err := filepath.Rel(Cwd(), path); err == nil && len(rel) < len(path) {
    		return rel
    	}
    	return path
    }
    
    // RelPaths returns a copy of paths with absolute paths
    // made relative to the current directory if they would be shorter.
    func RelPaths(paths []string) []string {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 20 19:17:27 UTC 2023
    - 2K bytes
    - Viewed (0)
  8. src/cmd/go/testdata/script/test_relative_import.txt

    # Relative imports in go test
    env GO111MODULE=off # relative import not supported in module mode
    
    # Run tests outside GOPATH.
    env GOPATH=$WORK/tmp
    
    go test ./testimport
    stdout '^ok'
    
    -- testimport/p.go --
    package p
    
    func F() int { return 1 }
    -- testimport/p1/p1.go --
    package p1
    
    func F() int { return 1 }
    -- testimport/p_test.go --
    package p
    
    import (
    	"./p1"
    
    	"testing"
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 17 13:25:29 UTC 2020
    - 443 bytes
    - Viewed (0)
  9. src/cmd/go/testdata/script/fileline.txt

    env GO111MODULE=off
    
    # look for short, relative file:line in error message
    ! go run ../../gopath/x/y/z/err.go
    stderr ^..[\\/]x[\\/]y[\\/]z[\\/]err.go:
    
    -- ../x/y/z/err.go --
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 19 19:57:03 UTC 2019
    - 201 bytes
    - Viewed (0)
  10. src/cmd/go/testdata/script/build_relative_pkgdir.txt

    env GO111MODULE=off
    
    # Regression test for golang.org/issue/21309: accept relative -pkgdir argument.
    
    [short] skip
    
    mkdir $WORK/gocache
    env GOCACHE=$WORK/gocache
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Oct 01 08:31:45 UTC 2022
    - 189 bytes
    - Viewed (0)
Back to top