Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for fn (0.18 sec)

  1. src/cmd/cgo/internal/test/issue1435.go

    	vs := []struct {
    		call           string
    		fn             func() error
    		filter, expect string
    	}{
    		{call: "Setegid(1)", fn: func() error { return syscall.Setegid(1) }, filter: "Gid:", expect: "\t0\t1\t0\t1"},
    		{call: "Setegid(0)", fn: func() error { return syscall.Setegid(0) }, filter: "Gid:", expect: "\t0\t0\t0\t0"},
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Jul 28 21:31:41 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  2. src/cmd/addr2line/main.go

    			fmt.Fprintf(stdout, "!reverse translation not implemented\n")
    			continue
    		}
    		pc, _ := strconv.ParseUint(strings.TrimPrefix(p, "0x"), 16, 64)
    		file, line, fn := tab.PCToLine(pc)
    		name := "?"
    		if fn != nil {
    			name = fn.Name
    		} else {
    			file = "?"
    			line = 0
    		}
    		fmt.Fprintf(stdout, "%s\n%s:%d\n", name, file, line)
    	}
    	stdout.Flush()
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Apr 11 16:34:30 GMT 2022
    - 2.3K bytes
    - Viewed (0)
  3. callbacks.go

    }
    
    func (p *processor) Register(name string, fn func(*DB)) error {
    	return (&callback{processor: p}).Register(name, fn)
    }
    
    func (p *processor) Remove(name string) error {
    	return (&callback{processor: p}).Remove(name)
    }
    
    func (p *processor) Replace(name string, fn func(*DB)) error {
    	return (&callback{processor: p}).Replace(name, fn)
    }
    
    func (p *processor) compile() (err error) {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Mar 26 03:33:36 GMT 2024
    - 8.6K bytes
    - Viewed (1)
  4. cmd/jwt_test.go

    	creds := globalActiveCred
    	b.Run("uncached", func(b *testing.B) {
    		fn := authenticateNode
    		b.ResetTimer()
    		b.ReportAllocs()
    		for i := 0; i < b.N; i++ {
    			fn(creds.AccessKey, creds.SecretKey, "aud")
    		}
    	})
    	b.Run("cached", func(b *testing.B) {
    		fn := newCachedAuthToken()
    		b.ResetTimer()
    		b.ReportAllocs()
    		for i := 0; i < b.N; i++ {
    			fn("aud")
    		}
    	})
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 16:45:14 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  5. internal/s3select/progress.go

    	pr.processedReader = newCountUpReader(r)
    
    	return &pr, nil
    }
    
    type nopReadCloser struct {
    	fn func()
    }
    
    func (n2 *nopReadCloser) Read(p []byte) (n int, err error) {
    	panic("should not be called")
    }
    
    func (n2 *nopReadCloser) Close() error {
    	if n2.fn != nil {
    		n2.fn()
    	}
    	n2.fn = nil
    	return nil
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Oct 18 15:44:36 GMT 2021
    - 4.2K bytes
    - Viewed (0)
  6. cmd/erasure-server-pool-decom.go

    		return errInvalidArgument
    	}
    
    	z.poolMetaMutex.Lock()
    	defer z.poolMetaMutex.Unlock()
    
    	fn := z.decommissionCancelers[idx]
    	if fn == nil {
    		// canceling a decommission before it started return an error.
    		return errDecommissionNotStarted
    	}
    
    	defer fn() // cancel any active thread.
    
    	if z.poolMeta.DecommissionCancel(idx) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 22 17:49:30 GMT 2024
    - 41.3K bytes
    - Viewed (1)
  7. cmd/os_unix.go

    		return consumed, nil, typ, err
    	}
    
    	return consumed, nameBuf[:nameLen], typ, nil
    }
    
    // readDirFn applies the fn() function on each entries at dirPath, doesn't recurse into
    // the directory itself, if the dirPath doesn't exist this function doesn't return
    // an error.
    func readDirFn(dirPath string, fn func(name string, typ os.FileMode) error) error {
    	fd, err := openFileWithFD(dirPath, readMode, 0o666)
    	if err != nil {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  8. internal/grid/benchmark_test.go

    	tests := []struct {
    		name string
    		fn   func(b *testing.B, n int)
    	}{
    		{name: "request", fn: benchmarkGridStreamReqOnly},
    		{name: "responses", fn: benchmarkGridStreamRespOnly},
    	}
    	for _, test := range tests {
    		b.Run(test.name, func(b *testing.B) {
    			for n := 2; n <= 32; n *= 2 {
    				b.Run("servers="+strconv.Itoa(n), func(b *testing.B) {
    					test.fn(b, n)
    				})
    			}
    		})
    	}
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 12.2K bytes
    - Viewed (0)
  9. cmd/utils.go

    	switch madmin.ProfilerType(profilerType) {
    	case madmin.ProfilerCPU:
    		dirPath, err := os.MkdirTemp("", "profile")
    		if err != nil {
    			return nil, err
    		}
    		fn := filepath.Join(dirPath, "cpu.out")
    		f, err := Create(fn)
    		if err != nil {
    			return nil, err
    		}
    		err = pprof.StartCPUProfile(f)
    		if err != nil {
    			return nil, err
    		}
    		prof.stopFn = func() ([]byte, error) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 31.3K bytes
    - Viewed (0)
  10. cmd/os_other.go

    	return err
    }
    
    func osMkdirAll(dirPath string, perm os.FileMode, _ string) error {
    	// baseDir is not honored in plan9 and solaris platforms.
    	return os.MkdirAll(dirPath, perm)
    }
    
    // readDirFn applies the fn() function on each entries at dirPath, doesn't recurse into
    // the directory itself, if the dirPath doesn't exist this function doesn't return
    // an error.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Sep 13 15:14:36 GMT 2023
    - 4K bytes
    - Viewed (0)
Back to top