Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 65 for Atoi (0.16 sec)

  1. internal/config/storageclass/storage-class_test.go

    		},
    		{
    			"EC:4:5",
    			StorageClass{
    				Parity: 4,
    			},
    			errors.New("Too many sections in EC:4:5"),
    		},
    		{
    			"EC:A",
    			StorageClass{
    				Parity: 4,
    			},
    			errors.New(`strconv.Atoi: parsing "A": invalid syntax`),
    		},
    		{
    			"AB",
    			StorageClass{
    				Parity: 4,
    			},
    			errors.New("Too few sections in AB"),
    		},
    	}
    	for i, tt := range tests {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Aug 15 23:04:20 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  2. internal/s3select/csv/record.go

    // converted based on the query.
    func (r *Record) Get(name string) (*sql.Value, error) {
    	index, found := r.nameIndexMap[name]
    	if !found {
    		// Check if index.
    		if strings.HasPrefix(name, "_") {
    			idx, err := strconv.Atoi(strings.TrimPrefix(name, "_"))
    			if err != nil {
    				return nil, fmt.Errorf("column %v not found", name)
    			}
    			// The position count starts at 1.
    			idx--
    			if idx >= len(r.csvRecord) || idx < 0 {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Sep 13 00:00:59 GMT 2022
    - 4.1K bytes
    - Viewed (0)
  3. logger/sql.go

    		sql = newSQL.String()
    	} else {
    		sql = numericPlaceholder.ReplaceAllString(sql, "$$$1$$")
    
    		sql = numericPlaceholderRe.ReplaceAllStringFunc(sql, func(v string) string {
    			num := v[1 : len(v)-1]
    			n, _ := strconv.Atoi(num)
    
    			// position var start from 1 ($1, $2)
    			n -= 1
    			if n >= 0 && n <= len(vars)-1 {
    				return vars[n]
    			}
    			return v
    		})
    	}
    
    	return sql
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Mar 21 08:00:02 GMT 2024
    - 5K bytes
    - Viewed (0)
  4. cmd/peer-rest-server.go

    	bucketName := r.Form.Get(peerRESTBucket)
    	enableSha256 := r.Form.Get(peerRESTEnableSha256) == "true"
    
    	size, err := strconv.Atoi(sizeStr)
    	if err != nil {
    		size = 64 * humanize.MiByte
    	}
    
    	concurrent, err := strconv.Atoi(concurrentStr)
    	if err != nil {
    		concurrent = 32
    	}
    
    	duration, err := time.ParseDuration(durationStr)
    	if err != nil {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 51.8K bytes
    - Viewed (0)
  5. schema/field.go

    	}
    
    	if num, ok := field.TagSettings["SIZE"]; ok {
    		if field.Size, err = strconv.Atoi(num); err != nil {
    			field.Size = -1
    		}
    	}
    
    	if p, ok := field.TagSettings["PRECISION"]; ok {
    		field.Precision, _ = strconv.Atoi(p)
    	}
    
    	if s, ok := field.TagSettings["SCALE"]; ok {
    		field.Scale, _ = strconv.Atoi(s)
    	}
    
    	// default value is function or null or blank (primary keys)
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
  6. internal/etag/etag.go

    //
    // Parts may panic if the ETag is an invalid multipart
    // ETag.
    func (e ETag) Parts() int {
    	if !e.IsMultipart() {
    		return 1
    	}
    
    	n := bytes.IndexRune(e, '-')
    	parts, err := strconv.Atoi(string(e[n+1:]))
    	if err != nil {
    		panic(err) // malformed ETag
    	}
    	return parts
    }
    
    // Format returns an ETag that is formatted as specified
    // by AWS S3.
    //
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Mar 10 21:09:36 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  7. cmd/sftp-server.go

    			host, portStr, err := net.SplitHostPort(tokens[1])
    			if err != nil {
    				logger.Fatal(fmt.Errorf("invalid arguments passed to --sftp=%s (%v)", arg, err), "unable to start SFTP server")
    			}
    			port, err = strconv.Atoi(portStr)
    			if err != nil {
    				logger.Fatal(fmt.Errorf("invalid arguments passed to --sftp=%s (%v)", arg, err), "unable to start SFTP server")
    			}
    			if port < 1 || port > 65535 {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  8. docs/debugging/s3-check-md5/main.go

    				continue
    			}
    			parts := 1
    			multipart := false
    			s := strings.Split(object.ETag, "-")
    			switch len(s) {
    			case 1:
    				// nothing to do
    			case 2:
    				if p, err := strconv.Atoi(s[1]); err == nil {
    					parts = p
    				} else {
    					log.Println("FAILED: ETAG of", objFullPath(object), "has a wrong format:", err)
    					continue
    				}
    				multipart = true
    			default:
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Feb 17 01:15:57 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  9. internal/event/target/postgresql.go

    	} else {
    		// Some fields need to be specified when ConnectionString is unspecified
    		if p.Port == "" {
    			return fmt.Errorf("unspecified port")
    		}
    		if _, err := strconv.Atoi(p.Port); err != nil {
    			return fmt.Errorf("invalid port")
    		}
    		if p.Database == "" {
    			return fmt.Errorf("database unspecified")
    		}
    	}
    
    	if p.QueueDir != "" {
    		if !filepath.IsAbs(p.QueueDir) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 24 17:51:07 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  10. src/cmd/asm/internal/asm/endtoend_test.go

    			index := len(f) - 1
    			suf := "(PC)"
    			for !strings.HasSuffix(f[index], suf) {
    				index--
    				suf = "(PC),"
    			}
    			str := f[index]
    			n, err := strconv.Atoi(str[:len(str)-len(suf)])
    			if err == nil {
    				f[index] = fmt.Sprintf("%d%s", seq+n, suf)
    			}
    		}
    
    		if len(f) == 1 {
    			printed = f[0]
    		} else {
    			printed = f[0] + "\t" + strings.Join(f[1:], " ")
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Dec 07 18:42:59 GMT 2023
    - 11.6K bytes
    - Viewed (0)
Back to top