Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for Hancic (0.14 sec)

  1. src/bytes/buffer_test.go

    	}
    }
    
    type panicReader struct{ panic bool }
    
    func (r panicReader) Read(p []byte) (int, error) {
    	if r.panic {
    		panic("oops")
    	}
    	return 0, io.EOF
    }
    
    // Make sure that an empty Buffer remains empty when
    // it is "grown" before a Read that panics
    func TestReadFromPanicReader(t *testing.T) {
    
    	// First verify non-panic behaviour
    	var buf Buffer
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 13:31:36 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  2. src/cmd/asm/internal/asm/operand_test.go

    func setArch(goarch string) (*arch.Arch, *obj.Link) {
    	buildcfg.GOOS = "linux" // obj can handle this OS for all architectures.
    	buildcfg.GOARCH = goarch
    	architecture := arch.Set(goarch, false)
    	if architecture == nil {
    		panic("asm: unrecognized architecture " + goarch)
    	}
    	ctxt := obj.Linknew(architecture.LinkArch)
    	ctxt.Pkgpath = "pkg"
    	return architecture, ctxt
    }
    
    func newParser(goarch string) *Parser {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 18:31:05 GMT 2023
    - 23.9K bytes
    - Viewed (0)
  3. src/cmd/cgo/doc.go

    	uintptr_t _cgo_wait_runtime_init_done(void) { return 0; }
    	void _cgo_release_context(uintptr_t ctxt) { }
    	char* _cgo_topofstack(void) { return (char*)0; }
    	void _cgo_allocate(void *a, int c) { }
    	void _cgo_panic(void *a, int c) { }
    	void _cgo_reginit(void) { }
    
    The extra functions here are stubs to satisfy the references in the C
    code generated for gcc. The build process links this stub, along with
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Sun Mar 31 09:02:45 GMT 2024
    - 42.1K bytes
    - Viewed (0)
  4. src/bytes/buffer.go

    // another n bytes. After Grow(n), at least n bytes can be written to the
    // buffer without another allocation.
    // If n is negative, Grow will panic.
    // If the buffer can't grow it will panic with [ErrTooLarge].
    func (b *Buffer) Grow(n int) {
    	if n < 0 {
    		panic("bytes.Buffer.Grow: negative count")
    	}
    	m := b.grow(n)
    	b.buf = b.buf[:m]
    }
    
    // Write appends the contents of p to the buffer, growing the buffer as
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 15.7K bytes
    - Viewed (0)
  5. doc/godebug.md

    The [GODEBUG History](#history) gives the exact defaults for each Go toolchain version.
    For example, Go 1.21 introduces the `panicnil` setting,
    controlling whether `panic(nil)` is allowed;
    it defaults to `panicnil=0`, making `panic(nil)` a run-time error.
    Using `panicnil=1` restores the behavior of Go 1.20 and earlier.
    
    When compiling a work module or workspace that declares
    Plain Text
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Tue Apr 16 17:29:58 GMT 2024
    - 13.5K bytes
    - Viewed (0)
  6. src/bufio/scan.go

    	if s.scanCalled {
    		panic("Buffer called after Scan")
    	}
    	s.buf = buf[0:cap(buf)]
    	s.maxTokenSize = max
    }
    
    // Split sets the split function for the [Scanner].
    // The default split function is [ScanLines].
    //
    // Split panics if it is called after scanning has started.
    func (s *Scanner) Split(split SplitFunc) {
    	if s.scanCalled {
    		panic("Split called after Scan")
    	}
    	s.split = split
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  7. src/bytes/example_test.go

    	n, err := b.Read(rdbuf)
    	if err != nil {
    		panic(err)
    	}
    	fmt.Println(n)
    	fmt.Println(b.String())
    	fmt.Println(string(rdbuf))
    	// Output:
    	// 1
    	// bcde
    	// a
    }
    
    func ExampleBuffer_ReadByte() {
    	var b bytes.Buffer
    	b.Grow(64)
    	b.Write([]byte("abcde"))
    	c, err := b.ReadByte()
    	if err != nil {
    		panic(err)
    	}
    	fmt.Println(c)
    	fmt.Println(b.String())
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  8. src/archive/tar/format.go

    		copy(b.toSTAR().trailer(), trailerSTAR)
    	case format.has(FormatUSTAR | FormatPAX):
    		copy(b.toUSTAR().magic(), magicUSTAR)
    		copy(b.toUSTAR().version(), versionUSTAR)
    	default:
    		panic("invalid format")
    	}
    
    	// Update checksum.
    	// This field is special in that it is terminated by a NULL then space.
    	var f formatter
    	field := b.toV7().chksum()
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 11.3K bytes
    - Viewed (0)
  9. src/builtin/builtin.go

    func close(c chan<- Type)
    
    // The panic built-in function stops normal execution of the current
    // goroutine. When a function F calls panic, normal execution of F stops
    // immediately. Any functions whose execution was deferred by F are run in
    // the usual way, and then F returns to its caller. To the caller G, the
    // invocation of F then behaves like a call to panic, terminating G's
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  10. src/bytes/bytes.go

    	if count == 0 {
    		return []byte{}
    	}
    
    	// Since we cannot return an error on overflow,
    	// we should panic if the repeat will generate an overflow.
    	// See golang.org/issue/16237.
    	if count < 0 {
    		panic("bytes: negative Repeat count")
    	}
    	if len(b) >= maxInt/count {
    		panic("bytes: Repeat output length overflow")
    	}
    	n := len(b) * count
    
    	if len(b) == 0 {
    		return []byte{}
    	}
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
Back to top