Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 63 for TrimSpace (0.24 sec)

  1. misc/go_android_exec/main.go

    	if err != nil {
    		if ee, ok := err.(*exec.ExitError); ok && len(ee.Stderr) > 0 {
    			return errorf("%v: %s", cmd, ee.Stderr)
    		}
    		return errorf("%v: %w", cmd, err)
    	}
    
    	parts := strings.SplitN(string(bytes.TrimSpace(out)), ":", 4)
    	if len(parts) < 2 {
    		return errorf("%v: missing ':' in output: %q", cmd, out)
    	}
    	importPath = parts[0]
    	if importPath == "" || importPath == "." {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Aug 21 17:46:57 GMT 2023
    - 15.3K bytes
    - Viewed (0)
  2. istioctl/pkg/install/k8sversion/version_test.go

    			logger := clog.NewConsoleLogger(&outBuf, &errBuf, nil)
    			IsK8VersionSupported(k8sClient, logger)
    
    			errMsgTrim := strings.TrimSpace(c.logMsg)
    			outBufTrim := strings.TrimSpace(outBuf.String())
    
    			if !c.isValid && strings.Compare(errMsgTrim, outBufTrim) != 0 {
    				t.Fatalf("\nwanted: %v \nbut found: %v", errMsgTrim, outBufTrim)
    			}
    
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Jan 19 02:46:48 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  3. clause/clause_test.go

    		if _, ok := buildNamesMap[c.Name()]; !ok {
    			buildNames = append(buildNames, c.Name())
    			buildNamesMap[c.Name()] = true
    		}
    
    		stmt.AddClause(c)
    	}
    
    	stmt.Build(buildNames...)
    
    	if strings.TrimSpace(stmt.SQL.String()) != result {
    		t.Errorf("SQL expects %v got %v", result, stmt.SQL.String())
    	}
    
    	if !reflect.DeepEqual(stmt.Vars, vars) {
    		t.Errorf("Vars expects %+v got %v", stmt.Vars, vars)
    	}
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Jun 02 02:50:38 GMT 2020
    - 1012 bytes
    - Viewed (0)
  4. cni/pkg/repair/repaircontroller.go

    		// If we are filtering on init container termination message and the termination message of 'state' does not match, exit
    		trimmedTerminationMessage := strings.TrimSpace(c.cfg.InitTerminationMsg)
    		return trimmedTerminationMessage == "" || trimmedTerminationMessage == strings.TrimSpace(state.Message)
    	}
    	// Helper function; checks that container exit code matches filter
    	matchExitCode := func(state *corev1.ContainerStateTerminated) bool {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Sat Feb 10 00:31:55 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  5. 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 Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 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 Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Apr 17 00:34:45 GMT 2024
    - 35.5K bytes
    - Viewed (2)
  7. operator/cmd/mesh/test-util_test.go

    func toMap(s string) map[string]any {
    	out := make(map[string]any)
    	for _, l := range strings.Split(s, ",") {
    		l = strings.TrimSpace(l)
    		kv := strings.Split(l, ":")
    		if len(kv) != 2 {
    			panic("bad key:value in " + s)
    		}
    		out[strings.TrimSpace(kv[0])] = strings.TrimSpace(kv[1])
    	}
    	if len(out) == 0 {
    		return nil
    	}
    	return out
    }
    
    Go
    - Registered: Wed Mar 20 22:53:08 GMT 2024
    - Last Modified: Tue Oct 31 14:48:28 GMT 2023
    - 15.3K bytes
    - Viewed (0)
  8. internal/s3select/sql/value.go

    	bytes, _ := v.ToBytes()
    	i, err := strconv.ParseInt(strings.TrimSpace(string(bytes)), 10, 64)
    	return i, err == nil
    }
    
    // Converts untyped value into float. The bool return implies success
    // - it returns false only if there is a conversion failure.
    func (v Value) bytesToFloat() (float64, bool) {
    	bytes, _ := v.ToBytes()
    	i, err := strconv.ParseFloat(strings.TrimSpace(string(bytes)), 64)
    	return i, err == nil
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Feb 25 20:31:19 GMT 2022
    - 20.2K bytes
    - Viewed (0)
  9. schema/index.go

    }
    
    func parseFieldIndexes(field *Field) (indexes []Index, err error) {
    	for _, value := range strings.Split(field.Tag.Get("gorm"), ";") {
    		if value != "" {
    			v := strings.Split(value, ":")
    			k := strings.TrimSpace(strings.ToUpper(v[0]))
    			if k == "INDEX" || k == "UNIQUEINDEX" {
    				var (
    					name       string
    					tag        = strings.Join(v[1:], ":")
    					idx        = strings.Index(tag, ",")
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sun Feb 04 07:49:19 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/swig/swig_test.go

    	// See https://golang.org/issue/23469.
    	output, err := exec.Command(swig, "-go", "-swiglib").Output()
    	if err != nil {
    		t.Skip("swig is missing Go support")
    	}
    	swigDir := strings.TrimSpace(string(output))
    
    	_, err = os.Stat(filepath.Join(swigDir, "go"))
    	if err != nil {
    		t.Skip("swig is missing Go support")
    	}
    
    	// Check that swig has a new enough version.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:07 GMT 2023
    - 3.7K bytes
    - Viewed (0)
Back to top