Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 71 for parseBool (0.26 sec)

  1. src/cmd/vendor/golang.org/x/tools/go/analysis/internal/analysisflags/flags.go

    func (ts *triState) Get() interface{} {
    	return *ts == setTrue
    }
    
    func (ts triState) isTrue() bool {
    	return ts == setTrue
    }
    
    func (ts *triState) Set(value string) error {
    	b, err := strconv.ParseBool(value)
    	if err != nil {
    		// This error message looks poor but package "flag" adds
    		// "invalid boolean value %q for -NAME: %s"
    		return fmt.Errorf("want true or false")
    	}
    	if b {
    		*ts = setTrue
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 19:00:13 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  2. cmd/object-api-options.go

    	opts, err = getOpts(ctx, r, bucket, object)
    	if err != nil {
    		return opts, err
    	}
    
    	deletePrefix := false
    	if d := r.Header.Get(xhttp.MinIOForceDelete); d != "" {
    		if b, err := strconv.ParseBool(d); err == nil {
    			deletePrefix = b
    		} else {
    			return opts, err
    		}
    	}
    
    	opts.DeletePrefix = deletePrefix
    	opts.Versioned = globalBucketVersioningSys.PrefixEnabled(bucket, object)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 13 06:56:12 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  3. schema/field.go

    	switch reflect.Indirect(fieldValue).Kind() {
    	case reflect.Bool:
    		field.DataType = Bool
    		if field.HasDefaultValue && !skipParseDefaultValue {
    			if field.DefaultValueInterface, err = strconv.ParseBool(field.DefaultValue); err != nil {
    				schema.err = fmt.Errorf("failed to parse %s as default value for bool, got error: %v", field.DefaultValue, err)
    			}
    		}
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 15 03:20:20 UTC 2024
    - 32K bytes
    - Viewed (0)
  4. cmd/common-main.go

    		}
    		for _, ekv := range ekvs {
    			os.Setenv(ekv.Key, ekv.Value)
    		}
    	}
    }
    
    func serverHandleEnvVars() {
    	var err error
    	globalBrowserEnabled, err = config.ParseBool(env.Get(config.EnvBrowser, config.EnableOn))
    	if err != nil {
    		logger.Fatal(config.ErrInvalidBrowserValue(err), "Invalid MINIO_BROWSER value in environment variable")
    	}
    	if globalBrowserEnabled {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 30 11:58:12 UTC 2024
    - 31.5K bytes
    - Viewed (0)
  5. cmd/sftp-server.go

    		case "mac-algos":
    			allowMACs = filterAlgos(arg, strings.Split(tokens[1], ","), supportedMACs)
    		case "trusted-user-ca-key":
    			userCaKeyFile = tokens[1]
    		case "password-auth":
    			disablePassAuth, _ = strconv.ParseBool(tokens[1])
    		}
    	}
    
    	if port == 0 {
    		port = 8022 // Default SFTP port, since no port was given.
    	}
    
    	if sshPrivateKey == "" {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Jun 05 07:51:13 UTC 2024
    - 16K bytes
    - Viewed (0)
  6. internal/config/identity/openid/openid.go

    		var (
    			cfgEnableVal        = getCfgVal(config.Enable)
    			isExplicitlyEnabled = cfgEnableVal != ""
    		)
    
    		var enabled bool
    		if isExplicitlyEnabled {
    			enabled, err = config.ParseBool(cfgEnableVal)
    			if err != nil {
    				return c, err
    			}
    			// No need to continue loading if the config is not enabled.
    			if !enabled {
    				continue
    			}
    		}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  7. plugin/pkg/admission/serviceaccount/admission.go

    	if s.LimitSecretReferences {
    		return true
    	}
    
    	if value, ok := serviceAccount.Annotations[EnforceMountableSecretsAnnotation]; ok {
    		enforceMountableSecretCheck, _ := strconv.ParseBool(value)
    		return enforceMountableSecretCheck
    	}
    
    	return false
    }
    
    // getServiceAccount returns the ServiceAccount for the given namespace and name if it exists
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 12 17:49:30 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  8. src/cmd/link/internal/ld/main.go

    type ternaryFlag int
    
    const (
    	ternaryFlagUnset ternaryFlag = iota
    	ternaryFlagFalse
    	ternaryFlagTrue
    )
    
    func (t *ternaryFlag) Set(s string) error {
    	v, err := strconv.ParseBool(s)
    	if err != nil {
    		return err
    	}
    	if v {
    		*t = ternaryFlagTrue
    	} else {
    		*t = ternaryFlagFalse
    	}
    	return nil
    }
    
    func (t *ternaryFlag) String() string {
    	switch *t {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 16:59:50 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top