Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for Position (5.06 sec)

  1. src/cmd/asm/internal/lex/lex.go

    	// Text returns the original string representation of the token.
    	Text() string
    	// File reports the source file name of the token.
    	File() string
    	// Base reports the position base of the token.
    	Base() *src.PosBase
    	// SetBase sets the position base.
    	SetBase(*src.PosBase)
    	// Line reports the source line number of the token.
    	Line() int
    	// Col reports the source column number of the token.
    	Col() int
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 18:31:05 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  2. cmd/namespace-lock_test.go

    import (
    	"context"
    	"runtime"
    	"testing"
    	"time"
    )
    
    // WARNING:
    //
    // Expected source line number is hard coded, 35, in the
    // following test. Adding new code before this test or changing its
    // position will cause the line number to change and the test to FAIL
    // Tests getSource().
    func TestGetSource(t *testing.T) {
    	currentSource := func() string { return getSource(2) }
    	gotSource := currentSource()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 3.1K bytes
    - Viewed (0)
  3. cmd/os_unix.go

    			}
    			return osErrToFileErr(err)
    		}
    
    	}
    	defer syscall.Close(fd)
    
    	bufp := direntPool.Get().(*[]byte)
    	defer direntPool.Put(bufp)
    	buf := *bufp
    
    	boff := 0 // starting read position in buf
    	nbuf := 0 // end valid data in buf
    
    	for {
    		if boff >= nbuf {
    			boff = 0
    			stop := globalOSMetrics.time(osMetricReadDirent)
    			nbuf, err = syscall.ReadDirent(fd, buf)
    			stop()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  4. logger/sql.go

    	} else {
    		sql = numericPlaceholder.ReplaceAllString(sql, "$$$1$$")
    
    		sql = numericPlaceholderRe.ReplaceAllStringFunc(sql, func(v string) string {
    			num := v[1 : len(v)-1]
    			n, _ := strconv.Atoi(num)
    
    			// position var start from 1 ($1, $2)
    			n -= 1
    			if n >= 0 && n <= len(vars)-1 {
    				return vars[n]
    			}
    			return v
    		})
    	}
    
    	return sql
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Mar 21 08:00:02 GMT 2024
    - 5K bytes
    - Viewed (0)
  5. internal/s3select/csv/record.go

    		// Check if index.
    		if strings.HasPrefix(name, "_") {
    			idx, err := strconv.Atoi(strings.TrimPrefix(name, "_"))
    			if err != nil {
    				return nil, fmt.Errorf("column %v not found", name)
    			}
    			// The position count starts at 1.
    			idx--
    			if idx >= len(r.csvRecord) || idx < 0 {
    				// If field index > number of columns, return null
    				return sql.FromNull(), nil
    			}
    			return sql.FromBytes([]byte(r.csvRecord[idx])), nil
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Sep 13 00:00:59 GMT 2022
    - 4.1K bytes
    - Viewed (0)
  6. src/cmd/cgo/godefs.go

    // a semicolon. We only have to worry about cases that can occur in an
    // expression passed through gofmt, which means composite literals and
    // (due to the printer possibly inserting newlines because of position
    // information) operators.
    var gofmtLineReplacer = strings.NewReplacer(
    	// Want to replace \n without ; after everything from
    	// https://golang.org/ref/spec#Operators_and_punctuation
    	// EXCEPT ++ -- ) ] }
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Sep 08 14:33:35 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  7. src/bytes/reader.go

    		abs = r.i + offset
    	case io.SeekEnd:
    		abs = int64(len(r.s)) + offset
    	default:
    		return 0, errors.New("bytes.Reader.Seek: invalid whence")
    	}
    	if abs < 0 {
    		return 0, errors.New("bytes.Reader.Seek: negative position")
    	}
    	r.i = abs
    	return abs, nil
    }
    
    // WriteTo implements the [io.WriterTo] interface.
    func (r *Reader) WriteTo(w io.Writer) (n int64, err error) {
    	r.prevRune = -1
    	if r.i >= int64(len(r.s)) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  8. cmd/httprange.go

    		if offsetBeginString[0] == '+' {
    			return nil, fmt.Errorf("Byte position ('%s') must not have a sign", offsetBeginString)
    		} else if offsetBegin, err = strconv.ParseInt(offsetBeginString, 10, 64); err != nil {
    			return nil, fmt.Errorf("'%s' does not have a valid first byte position value", rangeString)
    		} else if offsetBegin < 0 {
    			return nil, fmt.Errorf("First byte position is negative ('%d')", offsetBegin)
    		}
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun May 05 16:56:21 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  9. src/bytes/reader_test.go

    		{seek: io.SeekStart, off: 1, n: 1, want: "1"},
    		{seek: io.SeekCurrent, off: 1, wantpos: 3, n: 2, want: "34"},
    		{seek: io.SeekStart, off: -1, seekerr: "bytes.Reader.Seek: negative position"},
    		{seek: io.SeekStart, off: 1 << 33, wantpos: 1 << 33, readerr: io.EOF},
    		{seek: io.SeekCurrent, off: 1, wantpos: 1<<33 + 1, readerr: io.EOF},
    		{seek: io.SeekStart, n: 5, want: "01234"},
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Dec 13 18:45:54 GMT 2021
    - 8K bytes
    - Viewed (0)
  10. src/cmd/asm/internal/lex/slice.go

    	// but be prepared.
    	s.base = base
    }
    
    func (s *Slice) Line() int {
    	return s.line
    }
    
    func (s *Slice) Col() int {
    	// TODO: Col is only called when defining a macro and all it cares about is increasing
    	// position to discover whether there is a blank before the parenthesis.
    	// We only get here if defining a macro inside a macro.
    	// This imperfect implementation means we cannot tell the difference between
    	//	#define A #define B(x) x
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Jun 29 22:49:50 GMT 2023
    - 1.6K bytes
    - Viewed (0)
Back to top