- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 57 for dtoi (0.13 sec)
-
src/net/interface_plan9.go
} fields := getFields(line) if len(fields) < 4 { return nil, errors.New("invalid interface status file: " + ifcstat) } device := fields[1] mtustr := fields[3] mtu, _, ok := dtoi(mtustr) if !ok { return nil, errors.New("invalid status file of interface: " + ifcstat) } ifc.MTU = mtu // Not a loopback device ("/dev/null") or packet interface (e.g. "pkt2")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 06 14:00:54 UTC 2024 - 4.7K bytes - Viewed (0) -
src/net/dnsconfig_unix.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 02 22:14:43 UTC 2024 - 4.1K bytes - Viewed (0) -
src/net/parse_test.go
off int ok bool }{ {"", 0, 0, false}, {"0", 0, 1, true}, {"65536", 65536, 5, true}, {"123456789", big, 8, false}, {"-0", 0, 0, false}, {"-1234", 0, 0, false}, } { n, i, ok := dtoi(tt.in) if n != tt.out || i != tt.off || ok != tt.ok { t.Errorf("got %d, %d, %v; want %d, %d, %v", n, i, ok, tt.out, tt.off, tt.ok) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Feb 24 00:04:48 UTC 2024 - 1.6K bytes - Viewed (0) -
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) -
src/net/parse.go
// Bigger than we need, not too big to worry about overflow const big = 0xFFFFFF // Decimal to integer. // Returns number, characters consumed, success. func dtoi(s string) (n int, i int, ok bool) { n = 0 for i = 0; i < len(s) && '0' <= s[i] && s[i] <= '9'; i++ { n = n*10 + int(s[i]-'0') if n >= big { return big, i, false } } if i == 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 06 14:00:54 UTC 2024 - 5.7K bytes - Viewed (0) -
src/net/interface.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:16:53 UTC 2024 - 7.6K bytes - Viewed (0) -
src/strconv/atoi.go
return -int64(cutoff), rangeError(fnParseInt, s0) } n := int64(un) if neg { n = -n } return n, nil } // Atoi is equivalent to ParseInt(s, 10, 0), converted to type int. func Atoi(s string) (int, error) { const fnAtoi = "Atoi" sLen := len(s) if intSize == 32 && (0 < sLen && sLen < 10) || intSize == 64 && (0 < sLen && sLen < 19) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun May 05 00:24:26 UTC 2024 - 8.3K bytes - Viewed (0) -
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) -
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) -
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)