Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 49 for discord (0.32 sec)

  1. src/bufio/bufio_test.go

    	br.ReadRune()
    	br.Discard(1)
    	if err := br.UnreadRune(); err == nil {
    		t.Error("UnreadRune didn't fail after Discard")
    	}
    }
    
    func TestNoUnreadByteAfterDiscard(t *testing.T) {
    	br := NewReader(strings.NewReader("example"))
    	br.ReadByte()
    	br.Discard(1)
    	if err := br.UnreadByte(); err == nil {
    		t.Error("UnreadByte didn't fail after Discard")
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 10 18:56:01 UTC 2023
    - 51.5K bytes
    - Viewed (0)
  2. src/bufio/bufio.go

    			err = ErrBufferFull
    		}
    	}
    	return b.buf[b.r : b.r+n], err
    }
    
    // Discard skips the next n bytes, returning the number of bytes discarded.
    //
    // If Discard skips fewer than n bytes, it also returns an error.
    // If 0 <= n <= b.Buffered(), Discard is guaranteed to succeed without
    // reading from the underlying io.Reader.
    func (b *Reader) Discard(n int) (discarded int, err error) {
    	if n < 0 {
    		return 0, ErrNegativeCount
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 14:39:08 UTC 2023
    - 21.8K bytes
    - Viewed (0)
  3. src/cmd/cgo/internal/testsanitizers/testdata/tsan9.go

    func goSpin() {
    	start := time.Now()
    	for n := 0; n < 1<<20; n++ {
    		_ = make([]byte, n)
    		if time.Since(start) > 50*time.Millisecond {
    			break
    		}
    	}
    }
    
    func main() {
    	pprof.StartCPUProfile(io.Discard)
    	go C.spin()
    	goSpin()
    	pprof.StopCPUProfile()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  4. src/cmd/distpack/pack.go

    	binArch := base.Clone()
    	binArch.Filter(func(name string) bool {
    		// Discard bin/ for now, will add back later.
    		if strings.HasPrefix(name, "bin/") {
    			return false
    		}
    		// Discard most of pkg.
    		if strings.HasPrefix(name, "pkg/") {
    			// Keep pkg/include.
    			if strings.HasPrefix(name, "pkg/include/") {
    				return true
    			}
    			// Discard other pkg except pkg/tool.
    			if !strings.HasPrefix(name, "pkg/tool/") {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/walk/complit.go

    		}
    	default:
    		base.Fatalf("fixedlit bad op: %v", n.Op())
    	}
    
    	for _, r := range n.List {
    		a, value := splitnode(r)
    		if a == ir.BlankNode && !staticinit.AnySideEffects(value) {
    			// Discard.
    			continue
    		}
    
    		switch value.Op() {
    		case ir.OSLICELIT:
    			value := value.(*ir.CompLitExpr)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:03:54 UTC 2023
    - 19.5K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/lookup.go

    	// it must not be a pointer or interface type and it must be declared
    	// in the same package as the method.").
    	// Thus, if we have a named pointer type, proceed with the underlying
    	// pointer type but discard the result if it is a method since we would
    	// not have found it for T (see also go.dev/issue/8590).
    	if t := asNamed(T); t != nil {
    		if p, _ := t.Underlying().(*Pointer); p != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 19.8K bytes
    - Viewed (0)
  7. src/cmd/go/testdata/script/test_fuzz_cache.txt

    import (
    	"io"
    	"testing"
    )
    
    func FuzzEmpty(f *testing.F) {
        f.Fuzz(func (*testing.T, []byte) {})
    }
    
    func FuzzY(f *testing.F) {
    	f.Add([]byte("y"))
    	f.Fuzz(func(t *testing.T, b []byte) { Y(io.Discard, b) })
    }
    -- y.go --
    package y
    
    import (
    	"bytes"
    	"io"
    )
    
    func Y(w io.Writer, b []byte) {
    	if !bytes.Equal(b, []byte("y")) {
    		w.Write([]byte("not equal"))
    	}
    }
    -- empty/empty.go --
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 30 17:22:49 UTC 2022
    - 1.9K bytes
    - Viewed (0)
  8. api/go1.5.txt

    pkg archive/zip, method (*Writer) SetOffset(int64)
    pkg bufio, method (*Reader) Discard(int) (int, error)
    pkg bufio, method (ReadWriter) Discard(int) (int, error)
    pkg bytes, func LastIndexByte([]uint8, uint8) int
    pkg bytes, method (*Buffer) Cap() int
    pkg bytes, method (*Reader) Size() int64
    pkg crypto, const SHA512_224 = 14
    pkg crypto, const SHA512_224 Hash
    pkg crypto, const SHA512_256 = 15
    pkg crypto, const SHA512_256 Hash
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 30 21:14:09 UTC 2015
    - 46.6K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/resolver.go

    	// entries were deleted at the end of typeDecl because the respective receiver base
    	// types were not found. In that case, an error was reported when declaring those
    	// methods. We can now safely discard this map.
    	check.methods = nil
    }
    
    // inSourceOrder implements the sort.Sort interface.
    type inSourceOrder []Object
    
    func (a inSourceOrder) Len() int           { return len(a) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 14:10:44 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  10. src/cmd/go/terminal_test.go

    		os.Stdout.WriteString("2")
    	} else {
    		os.Stdout.WriteString("X")
    	}
    
    	// Before exiting, wait for the parent process to read the PTY output,
    	// at which point it will close stdin.
    	io.Copy(io.Discard, os.Stdin)
    
    	os.Exit(0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 07 18:18:50 UTC 2022
    - 3.3K bytes
    - Viewed (0)
Back to top