Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for stringToBool (0.2 sec)

  1. 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)
  2. src/cmd/vendor/github.com/google/pprof/internal/driver/config.go

    		if err != nil {
    			return err
    		}
    		*ptr = v
    	case *float64:
    		v, err := strconv.ParseFloat(value, 64)
    		if err != nil {
    			return err
    		}
    		*ptr = v
    	case *bool:
    		v, err := stringToBool(value)
    		if err != nil {
    			return err
    		}
    		*ptr = v
    	default:
    		panic(fmt.Sprintf("unsupported config field type %v", f.field.Type))
    	}
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 16 15:19:53 UTC 2024
    - 10.5K bytes
    - Viewed (0)
Back to top