Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for TrimSpace (0.17 sec)

  1. buildscripts/gen-ldflags.go

    	if commit, err = exec.Command(cmdName, cmdArgs...).Output(); err != nil {
    		fmt.Fprintln(os.Stderr, "Error generating git commit-id: ", err)
    		os.Exit(1)
    	}
    
    	return strings.TrimSpace(string(commit))
    }
    
    func commitTime() time.Time {
    	// git log --format=%cD -n1
    	var (
    		commitUnix []byte
    		err        error
    	)
    	cmdName := "git"
    	cmdArgs := []string{"log", "--format=%cI", "-n1"}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jun 16 23:10:48 GMT 2022
    - 3.3K bytes
    - Viewed (0)
  2. cmd/signature-v4-parser.go

    	creds := strings.SplitN(strings.TrimSpace(credElement), "=", 2)
    	if len(creds) != 2 {
    		return ch, ErrMissingFields
    	}
    	if creds[0] != "Credential" {
    		return ch, ErrMissingCredTag
    	}
    	credElements := strings.Split(strings.TrimSpace(creds[1]), SlashSeparator)
    	if len(credElements) < 5 {
    		return ch, ErrCredMalformed
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  3. internal/disk/stat_linux.go

    	if err != nil {
    		return nil, err
    	}
    	defer file.Close()
    
    	s, err := bufio.NewReader(file).ReadString('\n')
    	if err != nil && !errors.Is(err, io.EOF) {
    		return nil, err
    	}
    	statLine := strings.TrimSpace(s)
    	for _, token := range strings.Fields(statLine) {
    		ui64, err := strconv.ParseUint(token, 10, 64)
    		if err != nil {
    			return nil, err
    		}
    		stats = append(stats, ui64)
    	}
    
    	return stats, nil
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 26 19:34:50 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  4. cmd/bootstrap-peer-server.go

    		msg += fmt.Sprintf(`Mismatching environment values: %v. `, mismatching)
    	}
    	if len(extra) > 0 {
    		msg += fmt.Sprintf(`Extra environment values: %v. `, extra)
    	}
    
    	return errors.New(strings.TrimSpace(msg))
    }
    
    var skipEnvs = map[string]struct{}{
    	"MINIO_OPTS":          {},
    	"MINIO_CERT_PASSWD":   {},
    	"MINIO_SERVER_DEBUG":  {},
    	"MINIO_DSYNC_TRACE":   {},
    	"MINIO_ROOT_USER":     {},
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  5. internal/config/subnet/config.go

    	if len(proxy) > 0 {
    		proxyURL, err = xnet.ParseHTTPURL(proxy)
    		if err != nil {
    			return cfg, err
    		}
    
    	}
    
    	cfg.License = strings.TrimSpace(env.Get(config.EnvMinIOSubnetLicense, kvs.Get(config.License)))
    	cfg.APIKey = strings.TrimSpace(env.Get(config.EnvMinIOSubnetAPIKey, kvs.Get(config.APIKey)))
    	cfg.Proxy = proxy
    
    	if transport == nil {
    		// when transport is nil, it means we are just validating the
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Nov 24 17:59:35 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  6. cmd/common-main.go

    func parsEnvEntry(envEntry string) (envKV, error) {
    	envEntry = strings.TrimSpace(envEntry)
    	if envEntry == "" {
    		// Skip all empty lines
    		return envKV{
    			Skip: true,
    		}, nil
    	}
    	if strings.HasPrefix(envEntry, "#") {
    		// Skip commented lines
    		return envKV{
    			Skip: true,
    		}, nil
    	}
    	envTokens := strings.SplitN(strings.TrimSpace(strings.TrimPrefix(envEntry, "export")), config.EnvSeparator, 2)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat May 04 00:17:57 GMT 2024
    - 35.8K bytes
    - Viewed (2)
  7. internal/config/identity/openid/openid.go

    		}
    
    		if scopeList := getCfgVal(Scopes); scopeList != "" {
    			var scopes []string
    			for _, scope := range strings.Split(scopeList, ",") {
    				scope = strings.TrimSpace(scope)
    				if scope == "" {
    					return c, config.Errorf("empty scope value is not allowed '%s', please refer to our documentation", scopeList)
    				}
    				scopes = append(scopes, scope)
    			}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Nov 16 04:42:31 GMT 2023
    - 16.5K bytes
    - Viewed (0)
  8. internal/config/certs.go

    	// Read certificate file.
    	var data []byte
    	if data, err = os.ReadFile(certFile); err != nil {
    		return nil, err
    	}
    
    	// Trimming leading and tailing white spaces.
    	data = bytes.TrimSpace(data)
    
    	// Parse all certs in the chain.
    	current := data
    	for len(current) > 0 {
    		var pemBlock *pem.Block
    		if pemBlock, current = pem.Decode(current); pemBlock == nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  9. cmd/leak-detect_test.go

    		// Again split on a new line, the first line of the second half contains the info about the go routine.
    		sl := strings.SplitN(g, "\n", 2)
    		if len(sl) != 2 {
    			continue
    		}
    		stack := strings.TrimSpace(sl[1])
    		// ignore the testing go routine.
    		// since the tests will be invoking the leaktest it would contain the test go routine.
    		if strings.HasPrefix(stack, "testing.RunTests") {
    			continue
    		}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  10. 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)
Back to top