- Sort Score
- Result 10 results
- Languages All
Results 561 - 570 of 1,123 for Nil (0.01 sec)
-
internal/lock/lock_test.go
f, err := os.CreateTemp("", "lock") if err != nil { t.Fatal(err) } f.Close() defer func() { err = os.Remove(f.Name()) if err != nil { t.Fatal(err) } }() // lock the file l, err := LockedOpenFile(f.Name(), os.O_WRONLY, 0o600) if err != nil { t.Fatal(err) } // unlock the file if err = l.Close(); err != nil { t.Fatal(err) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 3.6K bytes - Viewed (0) -
internal/event/targetid.go
var s string if err := json.Unmarshal(data, &s); err != nil { return err } targetID, err := parseTargetID(s) if err != nil { return err } *tid = *targetID return nil } // parseTargetID - parses string to TargetID. func parseTargetID(s string) (*TargetID, error) { tokens := strings.Split(s, ":") if len(tokens) != 2 { return nil, fmt.Errorf("invalid TargetID format '%v'", s) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jun 01 21:59:40 UTC 2021 - 1.8K bytes - Viewed (0) -
docs/debugging/s3-check-md5/main.go
var e error minModTime, e = time.Parse(time.RFC3339, minModTimeStr) if e != nil { log.Fatalln("Unable to parse --modified-since:", e) } } u, err := url.Parse(endpoint) if err != nil { log.Fatalln(err) } secure := strings.EqualFold(u.Scheme, "https") transport, err := minio.DefaultTransport(secure) if err != nil { log.Fatalln(err) } if insecure { // skip TLS verification
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Feb 17 01:15:57 UTC 2024 - 6.3K bytes - Viewed (0) -
cmd/os_windows.go
handle, err := syscall.FindFirstFile(globAllP, data) if err != nil { return nil, syscallErrToFileErr(dirPath, err) } defer syscall.FindClose(handle) count := opts.count for ; count != 0; err = syscall.FindNextFile(handle, data) { if err != nil { if err == syscall.ERROR_NO_MORE_FILES { break } else { return nil, osErrToFileErr(&os.PathError{ Op: "FindNextFile",
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Oct 18 18:08:15 UTC 2023 - 5.1K bytes - Viewed (0) -
internal/logger/targets.go
// list of enabled loggers func AddSystemTarget(ctx context.Context, t Target) error { if err := t.Init(ctx); err != nil { return err } if consoleTgt == nil { if t.Type() == types.TargetConsole { consoleTgt = t } } systemTargets.add(t) return nil } func initKafkaTargets(ctx context.Context, cfgMap map[string]kafka.Config) ([]Target, []error) { tgts := []Target{}
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jun 03 15:44:50 UTC 2024 - 6K bytes - Viewed (0) -
cmd/metrics-realtime.go
} } cpuCount, err := c.Counts(true) if err != nil { m.Errors = append(m.Errors, fmt.Sprintf("%s: %v (cpuCount)", byHostName, err.Error())) } else { m.Aggregated.CPU.CPUCount = cpuCount } loadStat, err := load.Avg() if err != nil { m.Errors = append(m.Errors, fmt.Sprintf("%s: %v (loadStat)", byHostName, err.Error())) } else {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Jun 01 05:16:24 UTC 2024 - 6.3K bytes - Viewed (0) -
internal/config/storageclass/storage-class.go
scStr := string(b) if scStr == "" { return nil } s, err := parseStorageClass(scStr) if err != nil { return err } sc.Parity = s.Parity return nil } // MarshalText - marshals storage class string. func (sc *StorageClass) MarshalText() ([]byte, error) { if sc.Parity != 0 { return []byte(fmt.Sprintf("%s:%d", schemePrefix, sc.Parity)), nil } return []byte{}, nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 12 12:24:04 UTC 2024 - 12.3K bytes - Viewed (0) -
internal/hash/checksum.go
duplicates = res != nil res = NewChecksumWithType(ChecksumSHA1|ChecksumTrailing, "") } if duplicates { return nil, ErrInvalidChecksum } } if res != nil { return res, nil } } t, s := getContentChecksum(h) if t == ChecksumNone { if s == "" { return nil, nil } return nil, ErrInvalidChecksum }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 19 12:59:07 UTC 2024 - 12.7K bytes - Viewed (0) -
internal/bucket/bandwidth/monitor_gen.go
_ = field var zb0001 uint32 zb0001, err = dc.ReadMapHeader() if err != nil { err = msgp.WrapError(err) return } for zb0001 > 0 { zb0001-- field, err = dc.ReadMapKeyPtr() if err != nil { err = msgp.WrapError(err) return } switch msgp.UnsafeString(field) { default: err = dc.Skip() if err != nil { err = msgp.WrapError(err) return } } } return }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Mar 21 17:21:35 UTC 2024 - 5.4K bytes - Viewed (0) -
cmd/background-heal-ops.go
} } if task.respCh != nil { task.respCh <- healResult{result: res, err: err} continue } // when respCh is not set caller is not waiting but we // update the relevant metrics for them if bgSeq != nil { if err == nil { bgSeq.countHealed(res.Type) } else { bgSeq.countFailed(res.Type) } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 4.6K bytes - Viewed (0)