Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 61 for TrimSpace (3.18 sec)

  1. 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 May 08 22:53:08 GMT 2024
    - Last Modified: Fri Jan 19 02:46:48 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  2. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 25 20:31:19 GMT 2022
    - 20.2K bytes
    - Viewed (0)
  3. 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 May 08 22:53:08 GMT 2024
    - Last Modified: Tue Oct 31 14:48:28 GMT 2023
    - 15.3K 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 May 08 22:53:08 GMT 2024
    - Last Modified: Sat Feb 10 00:31:55 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. misc/ios/detect.go

    }
    
    func plistExtract(fname string, path string) ([]byte, error) {
    	out, err := exec.Command("/usr/libexec/PlistBuddy", "-c", "Print "+path, fname).CombinedOutput()
    	if err != nil {
    		return nil, err
    	}
    	return bytes.TrimSpace(out), nil
    }
    
    func getLines(cmd *exec.Cmd) [][]byte {
    	out := output(cmd)
    	lines := bytes.Split(out, []byte("\n"))
    	// Skip the empty line at the end.
    	if len(lines[len(lines)-1]) == 0 {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Oct 19 23:33:30 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  8. 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 May 05 09:35:13 GMT 2024
    - Last Modified: Sun Feb 04 07:49:19 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  9. schema/relationship.go

    		typeName = polymorphic + "Type"
    		typeId   = polymorphic + "ID"
    	)
    
    	if value, ok := field.TagSettings["POLYMORPHICTYPE"]; ok {
    		typeName = strings.TrimSpace(value)
    	}
    
    	if value, ok := field.TagSettings["POLYMORPHICID"]; ok {
    		typeId = strings.TrimSpace(value)
    	}
    
    	relation.Polymorphic.PolymorphicType = relation.FieldSchema.FieldsByName[typeName]
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 22.4K bytes
    - Viewed (0)
  10. cni/pkg/log/uds.go

    	for _, l := range cniLogs {
    		var msg cniLog
    		if err := json.Unmarshal([]byte(l), &msg); err != nil {
    			log.Debugf("Failed to unmarshal CNI plugin log entry: %v", err)
    			continue
    		}
    		msg.Msg = strings.TrimSpace(msg.Msg)
    		messages = append(messages, msg)
    	}
    	// Lock log message printing to prevent log messages from different CNI
    	// processes interleave.
    	l.mu.Lock()
    	defer l.mu.Unlock()
    	for _, m := range messages {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed Nov 29 01:05:12 GMT 2023
    - 3.3K bytes
    - Viewed (0)
Back to top