- Sort Score
- Result 10 results
- Languages All
Results 551 - 560 of 1,124 for nil (0.02 sec)
-
internal/once/init.go
if atomic.LoadUint32(&l.done) == 0 { return l.do(f) } return nil } func (l *Init) do(f func() error) error { l.m.Lock() defer l.m.Unlock() if atomic.LoadUint32(&l.done) == 0 { if err := f(); err != nil { return err } // Mark as done only when f() is successful atomic.StoreUint32(&l.done, 1) } return nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue May 09 04:20:31 UTC 2023 - 2.1K bytes - Viewed (0) -
istioctl/pkg/analyze/analyze_test.go
func TestErrorOnIssuesFound(t *testing.T) { g := NewWithT(t) msgs := []diag.Message{ diag.NewMessage( diag.NewMessageType(diag.Error, "B1", "Template: %q"), nil, "", ), diag.NewMessage( diag.NewMessageType(diag.Warning, "A1", "Template: %q"), nil, "", ), } err := errorIfMessagesExceedThreshold(msgs) g.Expect(err).To(BeIdenticalTo(AnalyzerFoundIssuesError{})) }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Tue Oct 31 14:48:28 UTC 2023 - 1.8K bytes - Viewed (0) -
istioctl/pkg/writer/ztunnel/configdump/configdump.go
return err } _, _ = c.Stdout.Write([]byte("\n")) if err := c.PrintServiceSummary(ServiceFilter{}); err != nil { return err } _, _ = c.Stdout.Write([]byte("\n")) if err := c.PrintPolicySummary(PolicyFilter{}); err != nil { return err } _, _ = c.Stdout.Write([]byte("\n")) if err := c.PrintSecretSummary(); err != nil { return err } return nil }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Jun 06 20:18:34 UTC 2024 - 3.9K 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) -
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/kms/secret-key_test.go
if err != nil { t.Fatalf("Failed to initialize KMS: %v", err) } key, err := KMS.GenerateKey(context.Background(), &GenerateKeyRequest{Name: "my-key"}) if err != nil { t.Fatalf("Failed to generate key: %v", err) } plaintext, err := KMS.Decrypt(context.TODO(), &DecryptRequest{ Name: key.KeyID, Ciphertext: key.Ciphertext, }) if err != nil { t.Fatalf("Failed to decrypt key: %v", err)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue May 07 23:55:37 UTC 2024 - 2.9K bytes - Viewed (0) -
istioctl/pkg/install/k8sversion/version.go
v, err := extractKubernetesVersion(versionInfo) if err != nil { return false, err } return MinK8SVersion <= v, nil } // extractKubernetesVersion returns the Kubernetes minor version. For example, `v1.19.1` will return `19` func extractKubernetesVersion(versionInfo *version.Info) (int, error) { ver, err := goversion.NewVersion(versionInfo.String()) if err != nil { return 0, fmt.Errorf("could not parse %v", err) }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Oct 30 21:50:50 UTC 2024 - 2.6K bytes - Viewed (0) -
docs/iam/access-manager-plugin.go
body, err := io.ReadAll(r.Body) if err != nil { writeErrorResponse(w, err) return } var out bytes.Buffer json.Indent(&out, body, "", " ") fmt.Printf("Received JSON payload:\n%s\n", out.String()) reqMap := make(map[string]interface{}) err = json.Unmarshal(body, &reqMap) if err != nil { writeErrorResponse(w, err) return }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Feb 08 17:15:20 UTC 2024 - 2.7K bytes - Viewed (0) -
cmd/bucket-quota.go
} return } func (sys *BucketQuotaSys) enforceQuotaHard(ctx context.Context, bucket string, size int64) error { if size < 0 { return nil } q, err := sys.Get(ctx, bucket) if err != nil { return err } var quotaSize uint64 if q != nil && q.Type == madmin.HardQuota { if q.Size > 0 { quotaSize = q.Size } else if q.Quota > 0 { quotaSize = q.Quota } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 15 00:34:56 UTC 2024 - 4.4K bytes - Viewed (0) -
soft_delete.go
if !n.Valid { return nil, nil } return n.Time, nil } func (n DeletedAt) MarshalJSON() ([]byte, error) { if n.Valid { return json.Marshal(n.Time) } return json.Marshal(nil) } func (n *DeletedAt) UnmarshalJSON(b []byte) error { if string(b) == "null" { n.Valid = false return nil } err := json.Unmarshal(b, &n.Time) if err == nil { n.Valid = true } return err }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Feb 01 06:40:55 UTC 2023 - 4.5K bytes - Viewed (1)