Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 708 for positioned (0.15 sec)

  1. src/cmd/cover/testdata/directives.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // This file is processed by the cover command, then a test verifies that
    // all compiler directives are preserved and positioned appropriately.
    
    //go:a
    
    //go:b
    package main
    
    //go:c1
    
    //go:c2
    //doc
    func c() {
    }
    
    //go:d1
    
    //doc
    //go:d2
    type d int
    
    //go:e1
    
    //doc
    //go:e2
    type (
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 16 23:38:38 UTC 2017
    - 502 bytes
    - Viewed (0)
  2. src/internal/types/testdata/fixedbugs/issue50782.go

    	// Field accesses are not permitted for now. Keep an error so
    	// we can find and fix this code once the situation changes.
    	return a.Value // ERROR "a.Value undefined"
    	// TODO: The error below should probably be positioned on the '-'.
    	// d := a /* ERROR "invalid operation: operator - not defined" */ .Value - b.Value
    	// return d.Abs()
    }
    
    // The second example from the issue.
    type T[P int] struct{ f P }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:27 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  3. src/go/internal/gcimporter/exportdata.go

    		err = fmt.Errorf("invalid archive header")
    		return
    	}
    	name = strings.TrimSpace(string(hdr[:16]))
    	return
    }
    
    // FindExportData positions the reader r at the beginning of the
    // export data section of an underlying GC-created object/archive
    // file by reading from it. The reader must be positioned at the
    // start of the file before calling this function. The hdr result
    // is the string before the export data, either "$$" or "$$B".
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 19 15:49:05 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  4. src/internal/txtar/archive.go

    	for {
    		if name, after = isMarker(data[i:]); name != "" {
    			return data[:i], name, after
    		}
    		j := bytes.Index(data[i:], newlineMarker)
    		if j < 0 {
    			return fixNL(data), "", nil
    		}
    		i += j + 1 // positioned at start of new possible marker
    	}
    }
    
    // isMarker checks whether data begins with a file marker line.
    // If so, it returns the name from the line and the data after the line.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 20 02:13:02 UTC 2022
    - 4.2K bytes
    - Viewed (0)
  5. src/cmd/pack/pack.go

    			ar.files = ar.files[:len(ar.files)-1]
    			return true
    		}
    	}
    	return false
    }
    
    // addFiles adds files to the archive. The archive is known to be
    // sane and we are positioned at the end. No attempt is made
    // to check for existing files.
    func (ar *Archive) addFiles() {
    	if len(ar.files) == 0 {
    		usage()
    	}
    	for _, file := range ar.files {
    		if verbose {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  6. src/compress/gzip/gunzip.go

    // In this mode, when the [Reader] reaches the end of the data stream,
    // [Reader.Read] returns [io.EOF]. The underlying reader must implement [io.ByteReader]
    // in order to be left positioned just after the gzip stream.
    // To start the next stream, call z.Reset(r) followed by z.Multistream(false).
    // If there is no next stream, z.Reset(r) will return [io.EOF].
    func (z *Reader) Multistream(ok bool) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 23:20:03 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  7. src/go/types/check_test.go

    		index := -1 // index of matching error
    		var delta int
    		for _, i := range indices {
    			if d := absDiff(gotPos.Column, errList[i].col); index < 0 || d < delta {
    				index, delta = i, d
    			}
    		}
    
    		// The closest column position must be within expected colDelta.
    		const colDelta = 0 // go/types errors are positioned correctly
    		if delta > colDelta {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 19:45:33 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  8. src/image/png/reader.go

    //
    // then this reader presents xxxyy. For well-formed PNG data, the decoder state
    // immediately before the first Read call is that d.r is positioned between the
    // first IDAT and xxx, and the decoder state immediately after the last Read
    // call is that d.r is positioned between yy and crc1.
    func (d *decoder) Read(p []byte) (int, error) {
    	if len(p) == 0 {
    		return 0, nil
    	}
    	for d.idatLength == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 26K bytes
    - Viewed (0)
  9. src/cmd/cover/cover_test.go

    				// to match directives in the test data.
    				name = "_empty"
    			} else if spec, ok := d.Specs[0].(*ast.TypeSpec); ok {
    				name = spec.Name.Name
    			}
    		}
    		pos := fset.Position(decl.Pos()).Offset
    		end := fset.Position(decl.End()).Offset
    		if name == "" {
    			prevEnd = end
    			continue
    		}
    		for _, p := range outputDirectives {
    			if !strings.HasPrefix(p.name, name) {
    				continue
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 07 16:54:28 UTC 2023
    - 18.4K bytes
    - Viewed (0)
  10. src/go/internal/gcimporter/iimport.go

    		return r.p.tparamIndex[id]
    
    	case instanceType:
    		if r.p.exportVersion < iexportVersionGenerics {
    			errorf("unexpected instantiation type")
    		}
    		// pos does not matter for instances: they are positioned on the original
    		// type.
    		_ = r.pos()
    		len := r.uint64()
    		targs := make([]types.Type, len)
    		for i := range targs {
    			targs[i] = r.typ()
    		}
    		baseType := r.typ()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.2K bytes
    - Viewed (0)
Back to top