- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 31 for remain (0.25 sec)
-
src/archive/zip/zip_test.go
} uint16string := strings.Repeat(".", uint16max) remain := wantLen for remain > 0 { commentLen := int(uint16max) - directoryHeaderLen - 1 thisRecLen := directoryHeaderLen + int(uint16max) + commentLen if int64(thisRecLen) > remain { remove := thisRecLen - int(remain) commentLen -= remove thisRecLen -= remove } remain -= int64(thisRecLen) f, err := w.CreateHeader(&FileHeader{
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Mar 27 18:23:49 GMT 2024 - 19.5K bytes - Viewed (0) -
doc/next/6-stdlib/1-time.md
will succeed. Such code should use a non-blocking receive instead. These new behaviors are only enabled when the main Go program is in a module with a `go.mod` `go` line using Go 1.23.0 or later. When Go 1.23 builds older programs, the old behaviors remain in effect. The new [GODEBUG setting](/doc/godebug) [`asynctimerchan=1`](/pkg/time/#NewTimer) can be used to revert back to asynchronous channel behaviors
Plain Text - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Fri Apr 12 20:57:18 GMT 2024 - 1.5K bytes - Viewed (0) -
src/bufio/bufio.go
return } b.lastByte = -1 b.lastRuneSize = -1 remain := n for { skip := b.Buffered() if skip == 0 { b.fill() skip = b.Buffered() } if skip > remain { skip = remain } b.r += skip remain -= skip if remain == 0 { return n, nil } if b.err != nil { return n - remain, b.readErr() } } } // Read reads data into p.
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Oct 12 14:39:08 GMT 2023 - 21.8K bytes - Viewed (0) -
src/bufio/bufio_test.go
type scriptedReader []func(p []byte) (n int, err error) func (sr *scriptedReader) Read(p []byte) (n int, err error) { if len(*sr) == 0 { panic("too many Read calls on scripted Reader. No steps remain.") } step := (*sr)[0] *sr = (*sr)[1:] return step(p) } func newScriptedReader(steps ...func(p []byte) (n int, err error)) io.Reader { sr := scriptedReader(steps) return &sr }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Feb 10 18:56:01 GMT 2023 - 51.5K bytes - Viewed (0) -
src/cmd/cgo/internal/swig/testdata/callback/main.go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "fmt" "os" ) func main() { if len(os.Args) != 2 { fatal("usage: callback testname") } switch os.Args[1] { default: fatal("unknown test %q", os.Args[1]) case "Call": testCall() case "Callback": testCallback() }
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri May 12 12:00:07 GMT 2023 - 1K bytes - Viewed (0) -
doc/go1.17_spec.html
called the <i>main package</i> with all the packages it imports, transitively. The main package must have package name <code>main</code> and declare a function <code>main</code> that takes no arguments and returns no value. </p> <pre> func main() { … } </pre> <p> Program execution begins by initializing the main package and then
HTML - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Thu Apr 11 20:22:45 GMT 2024 - 211.6K bytes - Viewed (0) -
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 i, err := buf.ReadFrom(panicReader{}) if err != nil {
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) -
src/cmd/cgo/doc.go
in general generate direct references to the system libraries. Instead, the build process generates an object file using dynamic linkage to the desired libraries. The main function is provided by _cgo_main.c: int main() { return 0; } void crosscall2(void(*fn)(void*), void *a, int c, uintptr_t ctxt) { } uintptr_t _cgo_wait_runtime_init_done(void) { return 0; } void _cgo_release_context(uintptr_t ctxt) { }
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) -
src/cmd/cgo/internal/test/issue24161e2/main.go
Austin Clements <******@****.***> 1683224724 -0400
Go - Registered: Tue Mar 26 11:13:08 GMT 2024 - Last Modified: Fri May 12 12:00:02 GMT 2023 - 1K bytes - Viewed (1) -
src/cmd/cgo/internal/swig/testdata/callback/main.cc
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // This .cc file will be automatically compiled by the go tool and // included in the package. #include <string> #include "main.h" std::string Caller::call() { if (callback_ != 0) return callback_->run(); return "";
C++ - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri May 12 12:00:07 GMT 2023 - 384 bytes - Viewed (0)