Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for ScanState (0.29 sec)

  1. src/cmd/vet/testdata/method/method.go

    // This file contains the code to check canonical methods.
    
    package method
    
    import "fmt"
    
    type MethodTest int
    
    func (t *MethodTest) Scan(x fmt.ScanState, c byte) { // ERROR "should have signature Scan\(fmt\.ScanState, rune\) error"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 20 15:46:42 UTC 2019
    - 394 bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/stdmethods/stdmethods.go

    // To do that, the arguments that have a = prefix are treated as
    // signals that the canonical meaning is intended: if a Scan
    // method doesn't have a fmt.ScanState as its first argument,
    // we let it go. But if it does have a fmt.ScanState, then the
    // rest has to match.
    var canonicalMethods = map[string]struct{ args, results []string }{
    	"As": {[]string{"any"}, []string{"bool"}}, // errors.As
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 09 01:28:01 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  3. src/fmt/scan.go

    package fmt
    
    import (
    	"errors"
    	"io"
    	"math"
    	"os"
    	"reflect"
    	"strconv"
    	"sync"
    	"unicode/utf8"
    )
    
    // ScanState represents the scanner state passed to custom scanners.
    // Scanners may do rune-at-a-time scanning or ask the ScanState
    // to discover the next space-delimited token.
    type ScanState interface {
    	// ReadRune reads the next rune (Unicode code point) from the input.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:56:20 UTC 2024
    - 31.9K bytes
    - Viewed (0)
  4. src/math/big/intconv.go

    	case '-':
    		neg = true
    	case '+':
    		// nothing to do
    	default:
    		r.UnreadByte()
    	}
    	return
    }
    
    // byteReader is a local wrapper around fmt.ScanState;
    // it implements the ByteReader interface.
    type byteReader struct {
    	fmt.ScanState
    }
    
    func (r byteReader) ReadByte() (byte, error) {
    	ch, size, err := r.ReadRune()
    	if size != 1 && err == nil {
    		err = fmt.Errorf("invalid rune %#U", ch)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  5. src/fmt/scan_test.go

    	renamedFloat64Val    renamedFloat64
    	renamedComplex64Val  renamedComplex64
    	renamedComplex128Val renamedComplex128
    )
    
    // Xs accepts any non-empty run of the verb character
    type Xs string
    
    func (x *Xs) Scan(state ScanState, verb rune) error {
    	tok, err := state.Token(true, func(r rune) bool { return r == verb })
    	if err != nil {
    		return err
    	}
    	s := string(tok)
    	if !regexp.MustCompile("^" + string(verb) + "+$").MatchString(s) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 20:25:13 UTC 2023
    - 39.3K bytes
    - Viewed (0)
  6. src/math/big/floatconv.go

    // [fmt.Scan] for floating point values, which are:
    // 'b' (binary), 'e', 'E', 'f', 'F', 'g' and 'G'.
    // Scan doesn't handle ±Inf.
    func (z *Float) Scan(s fmt.ScanState, ch rune) error {
    	s.SkipSpace()
    	_, _, err := z.scan(byteReader{s}, 0)
    	return err
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  7. src/math/big/ratconv.go

    var _ fmt.Scanner = &ratZero // *Rat must implement fmt.Scanner
    
    // Scan is a support routine for fmt.Scanner. It accepts the formats
    // 'e', 'E', 'f', 'F', 'g', 'G', and 'v'. All formats are equivalent.
    func (z *Rat) Scan(s fmt.ScanState, ch rune) error {
    	tok, err := s.Token(true, ratTok)
    	if err != nil {
    		return err
    	}
    	if !strings.ContainsRune("efgEFGv", ch) {
    		return errors.New("Rat.Scan: invalid verb")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 15 22:16:34 UTC 2023
    - 12.3K bytes
    - Viewed (0)
  8. api/go1.8.txt

    pkg expvar, method (*String) Value() string
    pkg go/doc, func IsPredeclared(string) bool
    pkg go/types, func Default(Type) Type
    pkg go/types, func IdenticalIgnoreTags(Type, Type) bool
    pkg math/big, method (*Float) Scan(fmt.ScanState, int32) error
    pkg math/big, method (*Int) Sqrt(*Int) *Int
    pkg math/rand, func Uint64() uint64
    pkg math/rand, method (*Rand) Uint64() uint64
    pkg math/rand, type Source64 interface, Int63() int64
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 21 05:25:57 UTC 2016
    - 16.3K bytes
    - Viewed (0)
  9. api/go1.txt

    pkg fmt, type ScanState interface { Read, ReadRune, SkipSpace, Token, UnreadRune, Width }
    pkg fmt, type ScanState interface, Read([]uint8) (int, error)
    pkg fmt, type ScanState interface, ReadRune() (int32, int, error)
    pkg fmt, type ScanState interface, SkipSpace()
    pkg fmt, type ScanState interface, Token(bool, func(int32) bool) ([]uint8, error)
    pkg fmt, type ScanState interface, UnreadRune() error
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"Fscan", Func, 0},
    		{"Fscanf", Func, 0},
    		{"Fscanln", Func, 0},
    		{"GoStringer", Type, 0},
    		{"Print", Func, 0},
    		{"Printf", Func, 0},
    		{"Println", Func, 0},
    		{"Scan", Func, 0},
    		{"ScanState", Type, 0},
    		{"Scanf", Func, 0},
    		{"Scanln", Func, 0},
    		{"Scanner", Type, 0},
    		{"Sprint", Func, 0},
    		{"Sprintf", Func, 0},
    		{"Sprintln", Func, 0},
    		{"Sscan", Func, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top