- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 49 for once (0.14 sec)
-
src/bufio/example_test.go
for i := 0; i < len(data); i++ { if data[i] == ',' { return i + 1, data[:i], nil } } if !atEOF { return 0, nil, nil } // There is one final token to be delivered, which may be the empty string. // Returning bufio.ErrFinalToken here tells Scan there are no more tokens after this // but does not trigger an error to be returned from Scan itself.
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Oct 23 09:06:30 GMT 2023 - 4.9K bytes - Viewed (0) -
src/bytes/bytes_test.go
t.Errorf("Equal(%d, %d, %d) = false", len, x, y) } } } } } // make sure Equal returns false for minimally different strings. The data // is all zeros except for a single one in one location. func TestNotEqual(t *testing.T) { var size = 128 if testing.Short() { size = 32 } a := make([]byte, size) b := make([]byte, size) for len := 0; len <= size; len++ {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Jan 24 16:07:25 GMT 2024 - 56.2K bytes - Viewed (0) -
src/bufio/bufio.go
var sw io.StringWriter tryStringWriter := true nn := 0 for len(s) > b.Available() && b.err == nil { var n int if b.Buffered() == 0 && sw == nil && tryStringWriter { // Check at most once whether b.wr is a StringWriter. sw, tryStringWriter = b.wr.(io.StringWriter) } if b.Buffered() == 0 && tryStringWriter { // Large write, empty buffer, and the underlying writer supports
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/cmd/api/main_test.go
switch { case len(features) == 0 || (len(required) > 0 && required[0] < features[0]): feature := take(&required) if exceptionSet[feature] { // An "unfortunate" case: the feature was once // included in the API (e.g. go1.txt), but was // subsequently removed. These are already // acknowledged by being in the file // "api/except.txt". No need to print them out // here.
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Apr 09 20:48:51 GMT 2024 - 31.4K bytes - Viewed (0) -
doc/next/6-stdlib/1-time.md
The main effect of this change is that Go now guarantees that for any call to a `Reset` or `Stop` method, no stale values prepared before that call will be sent or received after the call. Earlier versions of Go used channels with a one-element buffer, making it difficult to use `Reset` and `Stop` correctly. A visible effect of this change is that `len` and `cap` of timer channels now returns 0 instead of 1, which may affect programs that
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/cmd/asm/internal/asm/parse.go
return "", "", nil, false // Might as well stop now. } word, cond = p.lex.Text(), "" operands = scratch[:0] // Zero or more comma-separated operands, one per loop. nesting := 0 colon := -1 for tok != '\n' && tok != ';' { // Process one operand. var items []lex.Token if cap(operands) > len(operands) { // Reuse scratch items slice. items = operands[:cap(operands)][len(operands)][:0] } else {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Feb 21 14:34:57 GMT 2024 - 36.9K bytes - Viewed (0) -
src/builtin/builtin.go
// arguments of [cmp.Ordered] types. There must be at least one argument. // If T is a floating-point type and any of the arguments are NaNs, // max will return NaN. func max[T cmp.Ordered](x T, y ...T) T // The min built-in function returns the smallest value of a fixed number of // arguments of [cmp.Ordered] types. There must be at least one argument. // If T is a floating-point type and any of the arguments are NaNs,
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) -
src/cmd/asm/internal/lex/input.go
// argsFor returns a map from formal name to actual value for this argumented macro invocation. // The opening parenthesis has been absorbed. func (in *Input) argsFor(macro *Macro) map[string][]Token { var args [][]Token // One macro argument per iteration. Collect them all and check counts afterwards. for argNum := 0; ; argNum++ { tokens, tok := in.collectArgument(macro) args = append(args, tokens) if tok == ')' { break }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Aug 29 07:48:38 GMT 2023 - 12.6K bytes - Viewed (0) -
src/archive/tar/writer_test.go
t.Fatalf("Failed to read header: %s", err) } if header.Typeflag != TypeReg { t.Fatalf("Typeflag should've been %d, found %d", TypeReg, header.Typeflag) } } } // failOnceWriter fails exactly once and then always reports success. type failOnceWriter bool func (w *failOnceWriter) Write(b []byte) (int, error) { if !*w { return 0, io.ErrShortWrite } *w = true return len(b), nil }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Feb 27 16:39:23 GMT 2024 - 38.7K bytes - Viewed (0) -
src/cmd/asm/internal/asm/testdata/amd64dynlinkerror.s
RET TEXT ·a10(SB), 0, $0-0 CMPL runtime·writeBarrier(SB), $0 JEQ one ORQ R15, R15 // ERROR "when dynamic linking, R15 is clobbered by a global variable access and is used here" one: RET TEXT ·a11(SB), 0, $0-0 CMPL runtime·writeBarrier(SB), $0 JEQ one JMP two one: ORQ R15, R15 // ERROR "when dynamic linking, R15 is clobbered by a global variable access and is used here" two: RET
Others - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Mar 15 20:45:41 GMT 2023 - 4.8K bytes - Viewed (0)