Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 33 for TrimSpace (0.16 sec)

  1. docs/debugging/hash-set/main.go

    		b, err := os.ReadFile(file)
    		if err != nil {
    			log.Fatalln(err)
    		}
    		b = bytes.ReplaceAll(b, []byte("\r"), []byte{})
    		sc := bufio.NewScanner(bytes.NewBuffer(b))
    		for sc.Scan() {
    			object = strings.TrimSpace(sc.Text())
    			set := sipHashMod(prefix+object, setCount, id)
    			distrib[set] = append(distrib[set], prefix+object)
    		}
    		for set, files := range distrib {
    			fmt.Println("Set:", set+1, "Objects:", len(files))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.7K bytes
    - Viewed (0)
  2. docs/debugging/xl-meta/main.go

    				b0 := ""
    				if ndjson {
    					b, _ := json.Marshal(file)
    					b0 = fmt.Sprintf("%s: ", string(b))
    				}
    				b, err := decode(r, file)
    				if err != nil {
    					return err
    				}
    				b = bytes.TrimSpace(b)
    				if !ndjson {
    					b = bytes.TrimFunc(b, func(r rune) bool {
    						return r == '{' || r == '}' || r == '\n' || r == '\r'
    					})
    				}
    
    				toPrint = append(toPrint, fmt.Sprintf("%s%s", b0, string(b)))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 17:56:22 GMT 2024
    - 20.2K bytes
    - Viewed (1)
  3. docs/debugging/inspect/main.go

    			reader := bufio.NewReader(os.Stdin)
    			fmt.Print("Enter Decryption Key: ")
    
    			text, _ := reader.ReadString('\n')
    			// convert CRLF to LF
    			*keyHex = strings.ReplaceAll(text, "\n", "")
    			*keyHex = strings.TrimSpace(*keyHex)
    		}
    	}
    
    	var inputFileName, outputFileName string
    
    	// Parse parameters
    	switch {
    	case *stdin:
    		// Parse 'mc support inspect --json' output
    		input := struct {
    			File string `json:"file"`
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 11 21:22:47 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  4. cmd/bucket-lifecycle.go

    	versioned := globalBucketVersioningSys.PrefixEnabled(bucket, object)
    	versionSuspended := globalBucketVersioningSys.PrefixSuspended(bucket, object)
    	vid := strings.TrimSpace(r.Form.Get(xhttp.VersionID))
    	if vid != "" && vid != nullVersionID {
    		_, err := uuid.Parse(vid)
    		if err != nil {
    			s3LogIf(ctx, err)
    			return opts, InvalidVersionID{
    				Bucket:    bucket,
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 33.1K bytes
    - Viewed (0)
  5. cmd/object-multipart-handlers.go

    		return
    	}
    
    	// Read escaped copy source path to check for parameters.
    	cpSrcPath := r.Header.Get(xhttp.AmzCopySource)
    	var vid string
    	if u, err := url.Parse(cpSrcPath); err == nil {
    		vid = strings.TrimSpace(u.Query().Get(xhttp.VersionID))
    		// Note that url.Parse does the unescaping
    		cpSrcPath = u.Path
    	}
    
    	srcBucket, srcObject := path2BucketObject(cpSrcPath)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Mar 28 17:44:56 GMT 2024
    - 39K bytes
    - Viewed (0)
  6. cmd/streaming-signature-v4.go

    	trailerRaw := valueBuffer.Bytes()
    	if len(trailerRaw) > 0 && trailerRaw[len(trailerRaw)-1] != '\n' {
    		valueBuffer.Write([]byte{'\n'})
    	}
    	sig = sig[len("x-amz-trailer-signature:"):]
    	sig = bytes.TrimSpace(sig)
    	cr.chunkSHA256Writer.Write(valueBuffer.Bytes())
    	wantSig := cr.getTrailerChunkSignature()
    	if !compareSignatureV4(string(sig), wantSig) {
    		if cr.debug {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 18.2K bytes
    - Viewed (0)
  7. internal/s3select/select_test.go

    			if err != nil {
    				t.Error(err)
    				return
    			}
    			got, err := io.ReadAll(res)
    			if err != nil {
    				t.Error(err)
    				return
    			}
    			gotS := strings.TrimSpace(string(got))
    			if !reflect.DeepEqual(gotS, testCase.wantResult) {
    				t.Errorf("received response does not match with expected reply. Query: %s\ngot: %s\nwant:%s", testCase.query, gotS, testCase.wantResult)
    			}
    		})
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Dec 23 07:19:11 GMT 2023
    - 76.2K bytes
    - Viewed (0)
  8. cmd/sftp-server.go

    	var filteredAlgos []string
    	found := false
    	for _, algo := range want {
    		if len(algo) == 0 {
    			continue
    		}
    		for _, allowedAlgo := range allowed {
    			algo := strings.ToLower(strings.TrimSpace(algo))
    			if algo == allowedAlgo {
    				filteredAlgos = append(filteredAlgos, algo)
    				found = true
    				break
    			}
    		}
    		if !found {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 11:07:40 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  9. internal/config/storageclass/storage-class.go

    //
    //	is returned, the caller is expected to choose the right parity
    //	at that point.
    func (sCfg *Config) GetParityForSC(sc string) (parity int) {
    	ConfigLock.RLock()
    	defer ConfigLock.RUnlock()
    	switch strings.TrimSpace(sc) {
    	case RRS:
    		if !sCfg.initialized {
    			return -1
    		}
    		return sCfg.RRS.Parity
    	default:
    		if !sCfg.initialized {
    			return -1
    		}
    		return sCfg.Standard.Parity
    	}
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  10. cmd/object-api-options.go

    	attributes = make(map[string]struct{})
    	for _, v := range strings.Split(strings.TrimSpace(h.Get(xhttp.AmzObjectAttributes)), ",") {
    		if v != "" {
    			attributes[v] = struct{}{}
    		}
    	}
    
    	return
    }
    
    func parseIntHeader(bucket, object string, h http.Header, headerName string) (value int, err error) {
    	stringInt := strings.TrimSpace(h.Get(headerName))
    	if stringInt == "" {
    		return
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Apr 20 09:05:54 GMT 2024
    - 14.2K bytes
    - Viewed (0)
Back to top