Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for Reset (0.15 sec)

  1. src/cmd/asm/internal/asm/pseudo_test.go

    				t.Fatalf("Wrong pseudo-instruction: %s", test.pseudo)
    			}
    			errorLine := buf.String()
    			if test.expected != errorLine {
    				t.Errorf("Unexpected error %q; expected %q", errorLine, test.expected)
    			}
    			buf.Reset()
    		}
    	}
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  2. doc/next/6-stdlib/1-time.md

    now unbuffered, with capacity 0.
    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
    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)
  3. src/bytes/reader.go

    	}
    	r.i += int64(m)
    	n = int64(m)
    	if m != len(b) && err == nil {
    		err = io.ErrShortWrite
    	}
    	return
    }
    
    // Reset resets the [Reader.Reader] to be reading from b.
    func (r *Reader) Reset(b []byte) { *r = Reader{b, 0, -1} }
    
    // NewReader returns a new [Reader.Reader] reading from b.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  4. src/archive/zip/register.go

    type Decompressor func(r io.Reader) io.ReadCloser
    
    var flateWriterPool sync.Pool
    
    func newFlateWriter(w io.Writer) io.WriteCloser {
    	fw, ok := flateWriterPool.Get().(*flate.Writer)
    	if ok {
    		fw.Reset(w)
    	} else {
    		fw, _ = flate.NewWriter(w, 5)
    	}
    	return &pooledFlateWriter{fw: fw}
    }
    
    type pooledFlateWriter struct {
    	mu sync.Mutex // guards Close and Write
    	fw *flate.Writer
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  5. misc/wasm/wasm_exec.html

    		}).catch((err) => {
    			console.error(err);
    		});
    
    		async function run() {
    			console.clear();
    			await go.run(inst);
    			inst = await WebAssembly.instantiate(mod, go.importObject); // reset instance
    		}
    	</script>
    
    	<button onClick="run();" id="runButton" disabled>Run</button>
    </body>
    
    HTML
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Oct 02 17:25:11 GMT 2018
    - 1.3K bytes
    - Viewed (0)
  6. lib/time/update.bash

    fi
    
    echo Updated for $CODE/$DATA: $files
    
    commitmsg="lib/time: update to $CODE/$DATA
    
    Commit generated by update.bash.
    
    For #22487.
    "
    
    if [ "$1" = "-commit" ]; then
    	echo "Creating commit. Run 'git reset HEAD^' to undo commit."
    	echo
    	git commit -m "$commitmsg" $files
    	echo
    	git log -n1 --stat
    	echo
    Shell Script
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Feb 02 18:20:41 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  7. src/cmd/cgo/godefs.go

    	conf.Fprint(&buf, fset, f.AST)
    
    	return buf.String()
    }
    
    var gofmtBuf strings.Builder
    
    // gofmt returns the gofmt-formatted string for an AST node.
    func gofmt(n interface{}) string {
    	gofmtBuf.Reset()
    	err := printer.Fprint(&gofmtBuf, fset, n)
    	if err != nil {
    		return "<" + err.Error() + ">"
    	}
    	return gofmtBuf.String()
    }
    
    // gofmtLineReplacer is used to put a gofmt-formatted string for an
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Sep 08 14:33:35 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  8. src/bytes/reader_test.go

    	}
    }
    
    func TestReaderReset(t *testing.T) {
    	r := NewReader([]byte("世界"))
    	if _, _, err := r.ReadRune(); err != nil {
    		t.Errorf("ReadRune: unexpected error: %v", err)
    	}
    
    	const want = "abcdef"
    	r.Reset([]byte(want))
    	if err := r.UnreadRune(); err == nil {
    		t.Errorf("UnreadRune: expected error, got nil")
    	}
    	buf, err := io.ReadAll(r)
    	if err != nil {
    		t.Errorf("ReadAll: unexpected error: %v", err)
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Dec 13 18:45:54 GMT 2021
    - 8K bytes
    - Viewed (0)
  9. api/go1.15.txt

    pkg testing, method (*B) TempDir() string
    pkg testing, method (*T) Deadline() (time.Time, bool)
    pkg testing, method (*T) TempDir() string
    pkg testing, type TB interface, TempDir() string
    Plain Text
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Fri Jul 17 02:15:01 GMT 2020
    - 7.6K bytes
    - Viewed (0)
Back to top