Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 19 of 19 for CheckErr (0.56 sec)

  1. src/internal/pkgbits/encoder.go

    	w.p.elems[w.k][w.Idx] = sb.String()
    
    	return w.Idx
    }
    
    func (w *Encoder) checkErr(err error) {
    	if err != nil {
    		errorf("unexpected encoding error: %v", err)
    	}
    }
    
    func (w *Encoder) rawUvarint(x uint64) {
    	var buf [binary.MaxVarintLen64]byte
    	n := binary.PutUvarint(buf[:], x)
    	_, err := w.Data.Write(buf[:n])
    	w.checkErr(err)
    }
    
    func (w *Encoder) rawVarint(x int64) {
    	// Zig-zag encode.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 10 23:26:58 UTC 2022
    - 9.6K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/cmd/util/cmdutil.go

    func SubCmdRun() func(c *cobra.Command, args []string) {
    	return func(c *cobra.Command, args []string) {
    		if len(args) > 0 {
    			kubeadmutil.CheckErr(usageErrorf(c, "invalid subcommand %q", strings.Join(args, " ")))
    		}
    		c.Help()
    		kubeadmutil.CheckErr(kubeadmutil.ErrExit)
    	}
    }
    
    func usageErrorf(c *cobra.Command, format string, args ...interface{}) error {
    	msg := fmt.Sprintf(format, args...)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 29 05:14:21 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/server/deleted_kinds_test.go

    		},
    	}
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    			actual, actualErr := NewResourceExpirationEvaluator(tt.currentVersion)
    
    			checkErr(t, actualErr, tt.expectedErr)
    			if actualErr != nil {
    				return
    			}
    
    			actual.(*resourceExpirationEvaluator).strictRemovedHandlingInAlpha = false
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 14 00:05:53 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  4. src/internal/pkgbits/decoder.go

    	Relocs []RelocEnt
    	Data   strings.Reader
    
    	k   RelocKind
    	Idx Index
    }
    
    func (r *Decoder) checkErr(err error) {
    	if err != nil {
    		errorf("unexpected decoding error: %w", err)
    	}
    }
    
    func (r *Decoder) rawUvarint() uint64 {
    	x, err := readUvarint(&r.Data)
    	r.checkErr(err)
    	return x
    }
    
    // readUvarint is a type-specialized copy of encoding/binary.ReadUvarint.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 27 20:58:46 UTC 2022
    - 13.2K bytes
    - Viewed (0)
  5. src/net/lookup_test.go

    	_, err := LookupIP("golang.org")
    	checkErr(err)
    
    	// Double lookup.
    	var err1, err2 error
    	var wg sync.WaitGroup
    	wg.Add(2)
    	go func() {
    		defer wg.Done()
    		_, err1 = LookupIP("golang1.org")
    	}()
    	go func() {
    		defer wg.Done()
    		_, err2 = LookupIP("golang1.org")
    	}()
    	close(timeoutHookGo)
    	wg.Wait()
    	checkErr(err1)
    	checkErr(err2)
    
    	// Double lookup with context.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 41.4K bytes
    - Viewed (0)
  6. pkg/kubectl/cmd/convert/convert.go

    		Long:                  convertLong,
    		Example:               convertExample,
    		Run: func(cmd *cobra.Command, args []string) {
    			cmdutil.CheckErr(o.Complete(f, cmd))
    			cmdutil.CheckErr(o.RunConvert())
    		},
    	}
    
    	cmd.Flags().BoolVar(&o.local, "local", o.local, "If true, convert will NOT try to contact api-server but run locally.")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 03:21:17 UTC 2023
    - 9.6K bytes
    - Viewed (0)
  7. src/net/http/client_test.go

    		t.Errorf("with default client Do and empty Method, expected error %q, got %q", e, g)
    	}
    
    	var checkErr error
    	var lastVia []*Request
    	var lastReq *Request
    	c.CheckRedirect = func(req *Request, via []*Request) error {
    		lastReq = req
    		lastVia = via
    		return checkErr
    	}
    	res, err := c.Get(ts.URL)
    	if err != nil {
    		t.Fatalf("Get error: %v", err)
    	}
    	res.Body.Close()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:30:50 UTC 2024
    - 63.8K bytes
    - Viewed (0)
  8. src/net/http/transport_test.go

    type cancelTest struct {
    	mode     testMode
    	newReq   func(req *Request) *Request       // prepare the request to cancel
    	cancel   func(tr *Transport, req *Request) // cancel the request
    	checkErr func(when string, err error)      // verify the expected error
    }
    
    // runCancelTestTransport uses Transport.CancelRequest.
    func runCancelTestTransport(t *testing.T, mode testMode, f func(t *testing.T, test cancelTest)) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 192.6K bytes
    - Viewed (0)
  9. pkg/kubelet/kubelet_pods.go

    		dirPath, volName := vol.BlockVolumeMapper.GetPodDeviceMapPath()
    		symlinkPath := filepath.Join(dirPath, volName)
    		if islinkExist, checkErr := blkutil.IsSymlinkExist(symlinkPath); checkErr != nil {
    			return nil, checkErr
    		} else if islinkExist {
    			// Check readOnly in PVCVolumeSource and set read only permission if it's true.
    			permission := "mrw"
    			if vol.ReadOnly {
    				permission = "r"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 14 16:09:17 UTC 2024
    - 101.2K bytes
    - Viewed (0)
Back to top