Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 74 for parseBool (0.2 sec)

  1. misc/go_android_exec/main.go

    	}
    	importPath = parts[0]
    	if importPath == "" || importPath == "." {
    		return errorf("current directory does not have a Go import path")
    	}
    	isStd, err = strconv.ParseBool(parts[1])
    	if err != nil {
    		return errorf("%v: non-boolean .Standard in output: %q", cmd, out)
    	}
    	if len(parts) >= 4 {
    		modPath = parts[2]
    		modDir = parts[3]
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 21 17:46:57 UTC 2023
    - 15.3K bytes
    - Viewed (0)
  2. src/cmd/vendor/github.com/google/pprof/internal/driver/commands.go

    				if !interactiveMode {
    					return viewer.Wait()
    				}
    				return nil
    			}
    		}
    		return err
    	}
    }
    
    // stringToBool is a custom parser for bools. We avoid using strconv.ParseBool
    // to remain compatible with old pprof behavior (e.g., treating "" as true).
    func stringToBool(s string) (bool, error) {
    	switch strings.ToLower(s) {
    	case "true", "t", "yes", "y", "1", "":
    		return true, nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 16 15:19:53 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  3. pkg/model/proxy.go

    	return []byte(fmt.Sprintf(`"%t"`, s)), nil
    }
    
    func (s *StringBool) UnmarshalJSON(data []byte) error {
    	pls, err := strconv.Unquote(string(data))
    	if err != nil {
    		return err
    	}
    	b, err := strconv.ParseBool(pls)
    	if err != nil {
    		return err
    	}
    	*s = StringBool(b)
    	return nil
    }
    
    // ProxyConfig can only be marshaled using (gogo) jsonpb. However, the rest of node meta is not a proto
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 17:18:17 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go

    var fatalOnDecodeError = false
    
    func init() {
    	// check to see if we are running in a test environment
    	TestOnlySetFatalOnDecodeError(true)
    	fatalOnDecodeError, _ = strconv.ParseBool(os.Getenv("KUBE_PANIC_WATCH_DECODE_ERROR"))
    }
    
    // TestOnlySetFatalOnDecodeError should only be used for cases where decode errors are expected and need to be tested. e.g. conversion webhooks.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 25 10:26:38 UTC 2023
    - 18.9K bytes
    - Viewed (0)
  5. pkg/kube/inject/webhook.go

    func enablePrometheusMerge(mesh *meshconfig.MeshConfig, anno map[string]string) bool {
    	// If annotation is present, we look there first
    	if val, f := anno[annotation.PrometheusMergeMetrics.Name]; f {
    		bval, err := strconv.ParseBool(val)
    		if err != nil {
    			// This shouldn't happen since we validate earlier in the code
    			log.Warnf("invalid annotation %v=%v", annotation.PrometheusMergeMetrics.Name, bval)
    		} else {
    			return bval
    		}
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 14 17:59:39 UTC 2024
    - 42.2K bytes
    - Viewed (0)
  6. src/encoding/xml/read.go

    		if err != nil {
    			return err
    		}
    		dst.SetFloat(ftmp)
    	case reflect.Bool:
    		if len(src) == 0 {
    			dst.SetBool(false)
    			return nil
    		}
    		value, err := strconv.ParseBool(strings.TrimSpace(string(src)))
    		if err != nil {
    			return err
    		}
    		dst.SetBool(value)
    	case reflect.String:
    		dst.SetString(string(src))
    	case reflect.Slice:
    		if len(src) == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:04:28 UTC 2023
    - 22.4K bytes
    - Viewed (0)
  7. src/cmd/dist/test.go

    	timelog("start", "dist test")
    
    	os.Setenv("PATH", fmt.Sprintf("%s%c%s", gorootBin, os.PathListSeparator, os.Getenv("PATH")))
    
    	t.short = true
    	if v := os.Getenv("GO_TEST_SHORT"); v != "" {
    		short, err := strconv.ParseBool(v)
    		if err != nil {
    			fatalf("invalid GO_TEST_SHORT %q: %v", v, err)
    		}
    		t.short = short
    	}
    
    	cmd := exec.Command(gorootBinGo, "env", "CGO_ENABLED")
    	cmd.Stderr = new(bytes.Buffer)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 16:01:35 UTC 2024
    - 50K bytes
    - Viewed (0)
  8. pilot/pkg/model/context.go

    func (node *Proxy) IsUnprivileged() bool {
    	if node == nil || node.Metadata == nil {
    		return false
    	}
    	// expect explicit "true" value
    	unprivileged, _ := strconv.ParseBool(node.Metadata.UnprivilegedPod)
    	return unprivileged
    }
    
    // CanBindToPort returns true if the proxy can bind to a given port.
    func (node *Proxy) CanBindToPort(bindTo bool, port uint32) bool {
    	if bindTo {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jun 03 08:29:05 UTC 2024
    - 33.6K bytes
    - Viewed (0)
  9. pilot/pkg/serviceregistry/serviceentry/controller.go

    	}
    	// If health check is not enabled, assume its healthy
    	return true
    }
    
    func parseHealthAnnotation(s string) bool {
    	if s == "" {
    		return false
    	}
    	p, err := strconv.ParseBool(s)
    	if err != nil {
    		return false
    	}
    	return p
    }
    
    func (s *Controller) buildServiceInstances(
    	curr config.Config,
    	services []*model.Service,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 29 15:31:09 UTC 2024
    - 36.8K bytes
    - Viewed (0)
  10. src/cmd/go/internal/work/build.go

    	// https://go.dev/issue/51748: allow "-buildvcs=auto",
    	// in addition to the usual "true" and "false".
    	if s == "" || s == "auto" {
    		*f = "auto"
    		return nil
    	}
    
    	b, err := strconv.ParseBool(s)
    	if err != nil {
    		return errors.New("value is neither 'auto' nor a valid bool")
    	}
    	*f = (buildvcsFlag)(strconv.FormatBool(b)) // convert to canonical "true" or "false"
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 17:22:59 UTC 2024
    - 33.2K bytes
    - Viewed (0)
Back to top