Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 72 for init (0.32 sec)

  1. src/cmd/api/boring_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build boringcrypto
    
    package main
    
    import (
    	"fmt"
    	"os"
    )
    
    func init() {
    	fmt.Printf("SKIP with boringcrypto enabled\n")
    	os.Exit(0)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Aug 16 16:02:26 GMT 2023
    - 300 bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/test/cgo_thread_lock.go

    }
    */
    import "C"
    
    import (
    	"runtime"
    	"testing"
    	"time"
    )
    
    //export Gosched
    func Gosched() {
    	runtime.Gosched()
    }
    
    func init() {
    	testThreadLockFunc = testThreadLock
    }
    
    func testThreadLock(t *testing.T) {
    	stop := make(chan int)
    	go func() {
    		// We need the G continue running,
    		// so the M has a chance to run this G.
    		for {
    			select {
    			case <-stop:
    				return
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu May 18 16:55:07 GMT 2023
    - 939 bytes
    - Viewed (0)
  3. src/cmd/asm/internal/flags/flags.go

    	PCTab        string `help:"print named pc-value table\nOne of: pctospadj, pctofile, pctoline, pctoinline, pctopcdata"`
    }
    
    var (
    	D        MultiFlag
    	I        MultiFlag
    	PrintOut int
    	DebugV   bool
    )
    
    func init() {
    	flag.Var(&D, "D", "predefined symbol with optional simple value -D=identifier=value; can be set multiple times")
    	flag.Var(&I, "I", "include directory; can be set multiple times")
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 22 19:18:23 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  4. src/archive/tar/stat_unix.go

    import (
    	"io/fs"
    	"os/user"
    	"runtime"
    	"strconv"
    	"sync"
    	"syscall"
    )
    
    func init() {
    	sysStat = statUnix
    }
    
    // userMap and groupMap caches UID and GID lookups for performance reasons.
    // The downside is that renaming uname or gname by the OS never takes effect.
    var userMap, groupMap sync.Map // map[int]string
    
    func statUnix(fi fs.FileInfo, h *Header, doNameLookups bool) error {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 15 16:01:50 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  5. src/cmd/asm/internal/asm/endtoend_test.go

    	}
    }
    
    func Test386EndToEnd(t *testing.T) {
    	testEndToEnd(t, "386", "386")
    }
    
    func TestARMEndToEnd(t *testing.T) {
    	defer func(old int) { buildcfg.GOARM.Version = old }(buildcfg.GOARM.Version)
    	for _, goarm := range []int{5, 6, 7} {
    		t.Logf("GOARM=%d", goarm)
    		buildcfg.GOARM.Version = goarm
    		testEndToEnd(t, "arm", "arm")
    		if goarm == 6 {
    			testEndToEnd(t, "arm", "armv6")
    		}
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Dec 07 18:42:59 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  6. src/bytes/reader.go

    type Reader struct {
    	s        []byte
    	i        int64 // current reading index
    	prevRune int   // index of previous rune; or < 0
    }
    
    // Len returns the number of bytes of the unread portion of the
    // slice.
    func (r *Reader) Len() int {
    	if r.i >= int64(len(r.s)) {
    		return 0
    	}
    	return int(int64(len(r.s)) - r.i)
    }
    
    // Size returns the original length of the underlying byte slice.
    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)
  7. src/archive/zip/zip_test.go

    	}
    }
    
    func (r *rleBuffer) ReadAt(p []byte, off int64) (n int, err error) {
    	if len(p) == 0 {
    		return
    	}
    	skipParts := sort.Search(len(r.buf), func(i int) bool {
    		part := &r.buf[i]
    		return part.off+part.n > off
    	})
    	parts := r.buf[skipParts:]
    	if len(parts) > 0 {
    		skipBytes := off - parts[0].off
    		for _, part := range parts {
    			repeat := int(min(part.n-skipBytes, int64(len(p)-n)))
    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)
  8. src/builtin/builtin.go

    // invocation.
    type Type int
    
    // Type1 is here for the purposes of documentation only. It is a stand-in
    // for any Go type, but represents the same type for any given function
    // invocation.
    type Type1 int
    
    // IntegerType is here for the purposes of documentation only. It is a stand-in
    // for any integer type: int, uint, int8 etc.
    type IntegerType int
    
    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)
  9. src/bytes/bytes.go

    func IndexByte(b []byte, c byte) int {
    	return bytealg.IndexByte(b, c)
    }
    
    func indexBytePortable(s []byte, c byte) int {
    	for i, b := range s {
    		if b == c {
    			return i
    		}
    	}
    	return -1
    }
    
    // LastIndex returns the index of the last instance of sep in s, or -1 if sep is not present in s.
    func LastIndex(s, sep []byte) int {
    	n := len(sep)
    	switch {
    	case n == 0:
    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)
  10. src/bytes/reader_test.go

    package bytes_test
    
    import (
    	. "bytes"
    	"fmt"
    	"io"
    	"sync"
    	"testing"
    )
    
    func TestReader(t *testing.T) {
    	r := NewReader([]byte("0123456789"))
    	tests := []struct {
    		off     int64
    		seek    int
    		n       int
    		want    string
    		wantpos int64
    		readerr error
    		seekerr string
    	}{
    		{seek: io.SeekStart, off: 0, n: 20, want: "0123456789"},
    		{seek: io.SeekStart, off: 1, n: 1, want: "1"},
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Dec 13 18:45:54 GMT 2021
    - 8K bytes
    - Viewed (0)
Back to top