Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for dtoi (0.13 sec)

  1. src/net/lookup_windows_test.go

    	rx := regexp.MustCompile(`(?m)^([a-z0-9.\-]+)\s+mail exchanger\s*=\s*([0-9]+)\s*([a-z0-9.\-]+)$`)
    	for _, ans := range rx.FindAllStringSubmatch(r, -1) {
    		pref, _, _ := dtoi(ans[2])
    		mx = append(mx, &MX{absDomainName(ans[3]), uint16(pref)})
    	}
    	// windows nslookup syntax
    	// gmail.com       MX preference = 30, mail exchanger = alt3.gmail-smtp-in.l.google.com
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  2. src/net/interface.go

    	zoneCache.RUnlock()
    	if !ok && !updated {
    		zoneCache.update(nil, true)
    		zoneCache.RLock()
    		index, ok = zoneCache.toIndex[name]
    		zoneCache.RUnlock()
    	}
    	if !ok { // last resort
    		index, _, _ = dtoi(name)
    	}
    	return index
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:53 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  3. src/cmd/cgo/internal/swig/swig_test.go

    		return
    	}
    
    	var parseError error
    	atoi := func(s string) int {
    		x, err := strconv.Atoi(s)
    		if err != nil && parseError == nil {
    			parseError = err
    		}
    		return x
    	}
    	var major, minor, patch int
    	major = atoi(string(matches[1]))
    	if len(matches[2]) > 0 {
    		minor = atoi(string(matches[2][1:]))
    	}
    	if len(matches[3]) > 0 {
    		patch = atoi(string(matches[3][1:]))
    	}
    	if parseError != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 12:38:14 UTC 2024
    - 4K bytes
    - Viewed (0)
  4. internal/config/ilm/ilm.go

    	}
    
    	if err = config.CheckValidKeys(config.ILMSubSys, kvs, DefaultKVS); err != nil {
    		return cfg, err
    	}
    
    	tw, err := strconv.Atoi(env.Get(EnvILMTransitionWorkers, kvs.GetWithDefault(transitionWorkers, DefaultKVS)))
    	if err != nil {
    		return cfg, err
    	}
    
    	ew, err := strconv.Atoi(env.Get(EnvILMExpirationWorkers, kvs.GetWithDefault(expirationWorkers, DefaultKVS)))
    	if err != nil {
    		return cfg, err
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  5. src/crypto/internal/hpke/hpke_test.go

    		t.Run(vector.Name, func(t *testing.T) {
    			setup := parseVectorSetup(vector.Setup)
    
    			kemID, err := strconv.Atoi(setup["kem_id"])
    			if err != nil {
    				t.Fatal(err)
    			}
    			if _, ok := SupportedKEMs[uint16(kemID)]; !ok {
    				t.Skip("unsupported KEM")
    			}
    			kdfID, err := strconv.Atoi(setup["kdf_id"])
    			if err != nil {
    				t.Fatal(err)
    			}
    			if _, ok := SupportedKDFs[uint16(kdfID)]; !ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:33:33 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  6. internal/config/heal/heal.go

    	}
    	cfg.IOCount, err = strconv.Atoi(env.Get(EnvIOCount, kvs.GetWithDefault(IOCount, DefaultKVS)))
    	if err != nil {
    		return cfg, fmt.Errorf("'heal:max_io' value invalid: %w", err)
    	}
    	if ws := env.Get(EnvDriveWorkers, kvs.GetWithDefault(DriveWorkers, DefaultKVS)); ws != "" {
    		w, err := strconv.Atoi(ws)
    		if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  7. pkg/kube/version.go

    	if err != nil {
    		return -1
    	}
    	v, err := strconv.Atoi(clusterVersion.Major + clusterVersion.Minor)
    	if err != nil {
    		// Apparently some clusters don't put proper numbers here. Try GitVersion
    		vp, err := version.ParseGeneric(clusterVersion.GitVersion)
    		if err != nil {
    			// no good
    			return -1
    		}
    		np, err := strconv.Atoi(fmt.Sprintf("%d%d", vp.Major(), vp.Minor()))
    		if err != nil {
    			// no good...
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 17 23:16:29 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr.go

    // it is a String, will attempt a conversion to int,
    // returning 0 if a parsing error occurs.
    func (intstr *IntOrString) IntValue() int {
    	if intstr.Type == String {
    		i, _ := strconv.Atoi(intstr.StrVal)
    		return i
    	}
    	return int(intstr.IntVal)
    }
    
    // MarshalJSON implements the json.Marshaller interface.
    func (intstr IntOrString) MarshalJSON() ([]byte, error) {
    	switch intstr.Type {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  9. src/os/user/cgo_lookup_unix.go

    	}
    	if err != nil {
    		return nil, fmt.Errorf("user: lookup username %s: %v", username, err)
    	}
    	return buildUser(&pwd), err
    }
    
    func lookupUserId(uid string) (*User, error) {
    	i, e := strconv.Atoi(uid)
    	if e != nil {
    		return nil, e
    	}
    	return lookupUnixUid(i)
    }
    
    func lookupUnixUid(uid int) (*User, error) {
    	var pwd _C_struct_passwd
    	var found bool
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:08:14 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  10. internal/config/identity/tls/config.go

    )
    
    // GetExpiryDuration - return parsed expiry duration.
    func (l Config) GetExpiryDuration(dsecs string) (time.Duration, error) {
    	if dsecs == "" {
    		return defaultExpiry, nil
    	}
    
    	d, err := strconv.Atoi(dsecs)
    	if err != nil {
    		return 0, auth.ErrInvalidDuration
    	}
    
    	dur := time.Duration(d) * time.Second
    
    	if dur < minExpiry || dur > maxExpiry {
    		return 0, auth.ErrInvalidDuration
    	}
    	return dur, nil
    }
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 3.6K bytes
    - Viewed (0)
Back to top