Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 1,330 for func (0.19 sec)

  1. src/bufio/example_test.go

    package bufio_test
    
    import (
    	"bufio"
    	"bytes"
    	"fmt"
    	"os"
    	"strconv"
    	"strings"
    )
    
    func ExampleWriter() {
    	w := bufio.NewWriter(os.Stdout)
    	fmt.Fprint(w, "Hello, ")
    	fmt.Fprint(w, "world!")
    	w.Flush() // Don't forget to flush!
    	// Output: Hello, world!
    }
    
    func ExampleWriter_AvailableBuffer() {
    	w := bufio.NewWriter(os.Stdout)
    	for _, i := range []int64{1, 2, 3, 4} {
    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)
  2. istioctl/pkg/writer/envoy/clusters/clusters.go

    		}
    	}
    	return "unknown"
    }
    
    func retrieveEndpointPort(l *admin.HostStatus) uint32 {
    	addr := l.Address.GetSocketAddress()
    	if addr != nil {
    		return addr.GetPortValue()
    	}
    	return 0
    }
    
    func retrieveEndpointStatus(l *admin.HostStatus) core.HealthStatus {
    	return l.HealthStatus.GetEdsHealthStatus()
    }
    
    func retrieveFailedOutlierCheck(l *admin.HostStatus) bool {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu Nov 03 08:41:32 GMT 2022
    - 5.8K bytes
    - Viewed (0)
  3. internal/cachevalue/cache.go

    // guaranteed to be called only once.
    func (t *Cache[T]) InitOnce(ttl time.Duration, opts Opts, update func() (T, error)) {
    	t.Once.Do(func() {
    		t.ttl = ttl
    		t.updateFn = update
    		t.opts = opts
    	})
    }
    
    // Get will return a cached value or fetch a new one.
    // Tf the Update function returns an error the value is forwarded as is and not cached.
    func (t *Cache[T]) Get() (T, error) {
    	v := t.valErr.Load()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Mar 01 16:00:42 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  4. istioctl/pkg/writer/envoy/configdump/listener.go

    	}
    
    	return addrs
    }
    
    func retrieveListenerPort(l *listener.Listener) uint32 {
    	return l.Address.GetSocketAddress().GetPortValue()
    }
    
    func (c *ConfigWriter) PrintRemoteListenerSummary() error {
    	w, listeners, err := c.setupListenerConfigWriter()
    	if err != nil {
    		return err
    	}
    	// Sort by port, addr, type
    	sort.Slice(listeners, func(i, j int) bool {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed Nov 29 12:37:14 GMT 2023
    - 18.1K bytes
    - Viewed (0)
  5. src/cmd/cgo/internal/test/cgo_linux_test.go

    	}
    	testSetgidStress(t)
    }
    
    func Test1435(t *testing.T) { test1435(t) }
    func Test6997(t *testing.T) { test6997(t) }
    
    func Test9400(t *testing.T) {
    	if _, err := os.Stat("/etc/alpine-release"); err == nil {
    		t.Skip("setgid is broken with musl libc - go.dev/issue/39857")
    	}
    	test9400(t)
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 1K bytes
    - Viewed (0)
  6. cmd/net.go

    func mustSplitHostPort(hostPort string) (host, port string) {
    	xh, err := xnet.ParseHost(hostPort)
    	if err != nil {
    		logger.FatalIf(err, "Unable to split host port %s", hostPort)
    	}
    	return xh.Name, xh.Port.String()
    }
    
    // mustGetLocalIPs returns IPs of local interface
    func mustGetLocalIPs() (ipList []net.IP) {
    	ifs, err := net.Interfaces()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 26 15:00:38 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  7. istioctl/pkg/admin/istiodconfig_test.go

    			},
    		},
    	}
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    			if got := chooseClientFlag(tt.args.ctrzClient, tt.args.reset, tt.args.outputLogLevel,
    				tt.args.stackTraceLevel, tt.args.outputFormat); !reflect.DeepEqual(got, tt.want) {
    				t.Errorf("chooseClientFlag() = %v, want %v", got, tt.want)
    			}
    		})
    	}
    }
    
    func resourceHandler(writer http.ResponseWriter, request *http.Request) {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu Jun 15 15:02:17 GMT 2023
    - 6.2K bytes
    - Viewed (0)
  8. internal/bucket/bandwidth/monitor_gen.go

    				return
    			}
    		}
    	}
    	return
    }
    
    // EncodeMsg implements msgp.Encodable
    func (z BucketBandwidthReport) EncodeMsg(en *msgp.Writer) (err error) {
    	// map header, size 0
    	_ = z
    	err = en.Append(0x80)
    	if err != nil {
    		return
    	}
    	return
    }
    
    // MarshalMsg implements msgp.Marshaler
    func (z BucketBandwidthReport) MarshalMsg(b []byte) (o []byte, err error) {
    	o = msgp.Require(b, z.Msgsize())
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Mar 21 17:21:35 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  9. cmd/site-replication-utils_gen_test.go

    		t.Fatal(err)
    	}
    	if len(left) > 0 {
    		t.Errorf("%d bytes left over after Skip(): %q", len(left), left)
    	}
    }
    
    func BenchmarkMarshalMsgSiteResyncStatus(b *testing.B) {
    	v := SiteResyncStatus{}
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.MarshalMsg(nil)
    	}
    }
    
    func BenchmarkAppendMsgSiteResyncStatus(b *testing.B) {
    	v := SiteResyncStatus{}
    	bts := make([]byte, 0, v.Msgsize())
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Nov 14 15:16:40 GMT 2022
    - 2.4K bytes
    - Viewed (0)
  10. cmd/background-newdisks-heal-ops_gen_test.go

    		t.Fatal(err)
    	}
    	if len(left) > 0 {
    		t.Errorf("%d bytes left over after Skip(): %q", len(left), left)
    	}
    }
    
    func BenchmarkMarshalMsghealingTracker(b *testing.B) {
    	v := healingTracker{}
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.MarshalMsg(nil)
    	}
    }
    
    func BenchmarkAppendMsghealingTracker(b *testing.B) {
    	v := healingTracker{}
    	bts := make([]byte, 0, v.Msgsize())
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 2.3K bytes
    - Viewed (0)
Back to top