Search Options

Results per page
Sort
Preferred Languages
Advance

Results 481 - 490 of 938 for NIL (0.01 sec)

  1. internal/config/policy/plugin/config.go

    	// subtype to avoid recursive call to UnmarshalJSON()
    	type subArgs Args
    	var so subArgs
    
    	if err := json.Unmarshal(data, &so); err != nil {
    		return err
    	}
    
    	oa := Args(so)
    	if oa.URL == nil || oa.URL.String() == "" {
    		*a = oa
    		return nil
    	}
    
    	*a = oa
    	return nil
    }
    
    // AuthZPlugin - implements opa policy agent calls.
    type AuthZPlugin struct {
    	args   Args
    	client *http.Client
    }
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  2. misc/go_android_exec/main.go

    			if err := adb("push", modDir, deviceModDir); err != nil {
    				return 0, err
    			}
    		} else {
    			if err := adb("exec-out", "mkdir", "-p", deviceCwd); err != nil {
    				return 0, err
    			}
    			if err := adbCopyTree(deviceCwd, importPath); err != nil {
    				return 0, err
    			}
    
    			// Copy .go files from the package.
    			goFiles, err := filepath.Glob("*.go")
    			if err != nil {
    				return 0, err
    			}
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Mon Aug 21 17:46:57 UTC 2023
    - 15.3K bytes
    - Viewed (0)
  3. cmd/format-erasure_test.go

    	quorumFormat, err = getFormatErasureInQuorum(formats)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	badFormat := *quorumFormat
    	badFormat.Erasure.Sets = nil
    	if err = formatErasureV3Check(quorumFormat, &badFormat); err == nil {
    		t.Fatal("Unexpected success")
    	}
    
    	badFormatUUID := *quorumFormat
    	badFormatUUID.Erasure.Sets[0][0] = "bad-uuid"
    	if err = formatErasureV3Check(quorumFormat, &badFormatUUID); err == nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Apr 15 08:25:46 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  4. cmd/batch-expire_gen_test.go

    	v := BatchJobExpire{}
    	bts, err := v.MarshalMsg(nil)
    	if err != nil {
    		t.Fatal(err)
    	}
    	left, err := v.UnmarshalMsg(bts)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if len(left) > 0 {
    		t.Errorf("%d bytes left over after UnmarshalMsg(): %q", len(left), left)
    	}
    
    	left, err = msgp.Skip(bts)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if len(left) > 0 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Dec 02 10:51:33 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  5. cmd/last-minute_gen_test.go

    func TestMarshalUnmarshalAccElem(t *testing.T) {
    	v := AccElem{}
    	bts, err := v.MarshalMsg(nil)
    	if err != nil {
    		t.Fatal(err)
    	}
    	left, err := v.UnmarshalMsg(bts)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if len(left) > 0 {
    		t.Errorf("%d bytes left over after UnmarshalMsg(): %q", len(left), left)
    	}
    
    	left, err = msgp.Skip(bts)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if len(left) > 0 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jul 05 21:45:49 UTC 2022
    - 6.8K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. internal/logger/logrotate.go

    	if err != nil {
    		return err
    	}
    	defer gw.Close()
    
    	var wc io.WriteCloser
    	wc = gzip.NewWriter(gw)
    	if _, err = io.Copy(wc, r); err != nil {
    		return err
    	}
    
    	if err = wc.Close(); err != nil {
    		return err
    	}
    
    	// Persist to disk any caches.
    	if err = gw.Sync(); err != nil {
    		return err
    	}
    
    	// close everything before we delete.
    	if err = gw.Close(); err != nil {
    		return err
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  9. docs/debugging/inspect/decrypt-v2.go

    	for {
    		stream, err := sr.NextStream()
    		if err != nil {
    			if err == io.EOF {
    				if extracted {
    					return nil
    				}
    				return errors.New("no data found on stream")
    			}
    			if errors.Is(err, estream.ErrNoKey) {
    				if stream.Name == "inspect.zip" {
    					return errors.New("incorrect private key")
    				}
    				if err := stream.Skip(); err != nil {
    					return fmt.Errorf("stream skip: %w", err)
    				}
    				continue
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Apr 11 21:22:47 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  10. 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)
Back to top