- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for str (0.14 sec)
-
internal/config/bool-flag.go
// Any other value returns an error. func ParseBool(str string) (bool, error) { switch str { case "1", "t", "T", "true", "TRUE", "True", "on", "ON", "On": return true, nil case "0", "f", "F", "false", "FALSE", "False", "off", "OFF", "Off": return false, nil } if strings.EqualFold(str, "enabled") { return true, nil } if strings.EqualFold(str, "disabled") { return false, nil }
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Apr 07 15:10:40 GMT 2022 - 2.3K bytes - Viewed (0) -
internal/s3select/sql/jsonpath_test.go
{"s.authorInfo.yearRange[0]", []interface{}{1890.0, 1920.0, 1881.0}}, {"s.publicationHistory[0].pages", []interface{}{256.0, 336.0, Missing{}}}, } for i, tc := range cases { t.Run(tc.str, func(t *testing.T) { jp := JSONPath{} err := p.ParseString(tc.str, &jp) // fmt.Println(jp) if err != nil { t.Fatalf("parse failed!: %d %v %s", i, err, tc) } // Read only the first json object from the file
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Mon Sep 19 18:05:16 GMT 2022 - 2.8K bytes - Viewed (0) -
internal/config/bool-flag_test.go
expectedResult string }{ {bf, "off"}, {BoolFlag(true), "on"}, {BoolFlag(false), "off"}, } for _, testCase := range testCases { str := testCase.flag.String() if testCase.expectedResult != str { t.Fatalf("expected: %v, got: %v", testCase.expectedResult, str) } } } // Test BoolFlag.MarshalJSON() func TestBoolFlagMarshalJSON(t *testing.T) { var bf BoolFlag testCases := []struct {
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Tue Jun 01 21:59:40 GMT 2021 - 3.5K bytes - Viewed (0) -
cmd/object-api-utils.go
// Comparison is case insensitive. Explicit short-circuit if // the list contains the wildcard "*". func hasStringSuffixInSlice(str string, list []string) bool { str = strings.ToLower(str) for _, v := range list { if v == "*" { return true } if strings.HasSuffix(str, strings.ToLower(v)) { return true } } return false }
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Mon Mar 11 11:55:34 GMT 2024 - 35.6K bytes - Viewed (1) -
internal/config/compress/compress_test.go
{"text/*,application/json", []string{"text/*", "application/json"}, true}, } for _, testCase := range testCases { testCase := testCase t.Run(testCase.str, func(t *testing.T) { gotPatterns, err := parseCompressIncludes(testCase.str) if !testCase.success && err == nil { t.Error("expected failure but success instead") } if testCase.success && err != nil {
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Tue Jun 01 21:59:40 GMT 2021 - 1.8K bytes - Viewed (0) -
docs/sts/web-identity.py
return text % make_authorization_url() def make_authorization_url(): # Generate a random string for the state parameter # Save it for use later to prevent xsrf attacks state = str(uuid4()) params = {"client_id": client_id, "response_type": "code", "state": state, "redirect_uri": callback_uri, "scope": "openid"}
Python - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Wed Jul 28 01:37:51 GMT 2021 - 2.9K bytes - Viewed (1) -
internal/amztime/parse.go
} // ParseReplicationTS parse http.TimeFormat first // will try time.RFC3339Nano when parse http.TimeFormat failed func ParseReplicationTS(str string) (time.Time, error) { tm, err := time.Parse(http.TimeFormat, str) if tm.IsZero() || err != nil { tm, err = time.Parse(time.RFC3339Nano, str) } return tm, err
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 2.5K bytes - Viewed (0) -
cmd/utils.go
if len(strs) == 0 { return "" } xfix := strs[0] // short-circuit single-element list if len(strs) == 1 { return xfix } // compare first to rest for _, str := range strs[1:] { xfixl := len(xfix) strl := len(str) // short-circuit empty strings if xfixl == 0 || strl == 0 { return "" } // maximum possible length maxl := xfixl if strl < maxl { maxl = strl }
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Wed Apr 24 04:08:47 GMT 2024 - 31.3K bytes - Viewed (0) -
internal/config/config_test.go
keys: []string{"connection_string", "comment"}, expectedFields: map[string]struct{}{}, }, // Incorrect type of input v/s required keys. { input: `comme="really long comment" connection_str="host=localhost port=2832"`, keys: []string{"connection_string", "comment"}, expectedFields: map[string]struct{}{}, }, } for _, test := range tests { test := test t.Run("", func(t *testing.T) {
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Aug 18 22:55:17 GMT 2022 - 4.2K bytes - Viewed (0) -
cmd/update_test.go
} } str := getUserAgent(testCase.mode) expectedStr := testCase.expectedStr if IsDocker() { expectedStr = strings.ReplaceAll(expectedStr, "; source", "; docker; source") } if !strings.Contains(str, expectedStr) { t.Errorf("Test %d: expected: %s, got: %s", i+1, expectedStr, str) } globalIsCICD = sci
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Sat Mar 09 03:07:08 GMT 2024 - 10.7K bytes - Viewed (0)