- Sort Score
- Result 10 results
- Languages All
Results 211 - 220 of 1,950 for func (0.02 sec)
-
internal/config/errors-utils.go
// Msg - Replace the current error's message func (u Err) Msg(m string) Err { e := u.Clone() e.msg = m return e } // Msgf - Replace the current error's message func (u Err) Msgf(m string, args ...interface{}) Err { e := u.Clone() if len(args) == 0 { e.msg = m } else { e.msg = fmt.Sprintf(m, args...) } return e } // Hint - Replace the current error's message
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 14 17:11:51 UTC 2024 - 3.8K bytes - Viewed (0) -
cni/pkg/nodeagent/pod_cache_test.go
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) func openNsTestOverride(s string) (NetnsCloser, error) { return newFakeNs(inc()), nil } func openNsTestOverrideWithInodes(inodes ...uint64) func(s string) (NetnsCloser, error) { i := 0 return func(s string) (NetnsCloser, error) { inode := inodes[i] i++ return newFakeNsInode(inc(), inode), nil } } func TestUpsertPodCache(t *testing.T) { counter.Store(0)
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Aug 14 19:36:19 UTC 2024 - 4.2K bytes - Viewed (0) -
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())
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Apr 23 18:58:53 UTC 2021 - 2.3K bytes - Viewed (0) -
cmd/encryption-v1_test.go
t.Fatalf("Test: expected %d, got %d", 1, partStart) } } func TestGetDecryptedRange(t *testing.T) { var ( pkgSz = int64(64) * humanize.KiByte minPartSz = int64(5) * humanize.MiByte maxPartSz = int64(5) * humanize.GiByte getEncSize = func(s int64) int64 { v, _ := sio.EncryptedSize(uint64(s)) return int64(v) } udMap = func(isMulti bool) map[string]string { m := map[string]string{
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Sep 24 04:17:08 UTC 2022 - 19.9K bytes - Viewed (0) -
internal/etag/etag.go
// // The returned string is a hex representation of the // binary ETag with an optional '-<part-number>' suffix. func (e ETag) String() string { if e.IsMultipart() { return hex.EncodeToString(e[:16]) + string(e[16:]) } return hex.EncodeToString(e) } // IsEncrypted reports whether the ETag is encrypted. func (e ETag) IsEncrypted() bool { // An encrypted ETag must be at least 32 bytes long.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Mar 10 21:09:36 UTC 2024 - 13.3K bytes - Viewed (0) -
internal/hash/reader.go
// not the actual SHA256 checksum of the content. func (r *Reader) SHA256() []byte { return r.contentSHA256 } // SHA256HexString returns a hex representation of the SHA256. func (r *Reader) SHA256HexString() string { return hex.EncodeToString(r.contentSHA256) } // ContentCRCType returns the content checksum type. func (r *Reader) ContentCRCType() ChecksumType { return r.contentHash.Type }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 19 12:59:07 UTC 2024 - 10.9K bytes - Viewed (0) -
internal/cachevalue/cache_test.go
"errors" "testing" "time" ) func slowCaller(ctx context.Context) error { sl := time.NewTimer(time.Second) defer sl.Stop() select { case <-sl.C: case <-ctx.Done(): return ctx.Err() } return nil } func TestCacheCtx(t *testing.T) { cache := New[time.Time]() t.Parallel() cache.InitOnce(2*time.Second, Opts{}, func(ctx context.Context) (time.Time, error) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu May 09 00:51:34 UTC 2024 - 2.7K bytes - Viewed (0) -
internal/store/batch.go
func (b *Batch[I]) Close() error { defer func() { close(b.quitCh) }() b.Lock() defer b.Unlock() return b.commit() } // NewBatch creates a new batch func NewBatch[I any](config BatchConfig[I]) *Batch[I] { if config.CommitTimeout == 0 { config.CommitTimeout = defaultCommitTimeout } quitCh := make(chan struct{}) batch := &Batch[I]{
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 2.9K bytes - Viewed (0) -
misc/ios/detect.go
matches++ } } } if matches == len(udids) { files = append(files, string(line)) } } return files } func parseMobileProvision(fname string) *exec.Cmd { return exec.Command("security", "cms", "-D", "-i", string(fname)) } func plistExtract(fname string, path string) ([]byte, error) { out, err := exec.Command("/usr/libexec/PlistBuddy", "-c", "Print "+path, fname).CombinedOutput()
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 19 23:33:30 UTC 2023 - 3.2K bytes - Viewed (0) -
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} {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 5.5K bytes - Viewed (0)