Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 38 for str (5.52 sec)

  1. internal/bucket/versioning/versioning_test.go

    	v := Versioning{
    		Status: Enabled,
    	}
    	buf, err := xml.Marshal(v)
    	if err != nil {
    		t.Fatalf("Failed to marshal %v: %v", v, err)
    	}
    
    	str := string(buf)
    	if strings.Contains(str, "ExcludedPrefixes") {
    		t.Fatalf("XML shouldn't contain ExcludedPrefixes tag - %s", str)
    	}
    }
    
    func TestVersioningZero(t *testing.T) {
    	var v Versioning
    	if v.Enabled() {
    		t.Fatalf("Expected to be disabled but got enabled")
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun May 08 05:06:44 GMT 2022
    - 8.8K bytes
    - Viewed (0)
  2. tests/embedded_struct_test.go

    }
    
    func (c *Content) Scan(src interface{}) error {
    	var value Content
    	str, ok := src.(string)
    	if !ok {
    		byt, ok := src.([]byte)
    		if !ok {
    			return errors.New("Embedded.Scan byte assertion failed")
    		}
    		if err := json.Unmarshal(byt, &value); err != nil {
    			return err
    		}
    	} else {
    		if err := json.Unmarshal([]byte(str), &value); err != nil {
    			return err
    		}
    	}
    
    	*c = value
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Oct 26 03:58:13 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  3. src/cmd/asm/internal/asm/endtoend_test.go

    		if len(f) > 0 && strings.Contains(printed, "(PC)") {
    			index := len(f) - 1
    			suf := "(PC)"
    			for !strings.HasSuffix(f[index], suf) {
    				index--
    				suf = "(PC),"
    			}
    			str := f[index]
    			n, err := strconv.Atoi(str[:len(str)-len(suf)])
    			if err == nil {
    				f[index] = fmt.Sprintf("%d%s", seq+n, suf)
    			}
    		}
    
    		if len(f) == 1 {
    			printed = f[0]
    		} else {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Dec 07 18:42:59 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  4. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 11 11:55:34 GMT 2024
    - 35.6K bytes
    - Viewed (1)
  5. callbacks.go

    	c.processor.callbacks = append(c.processor.callbacks, c)
    	return c.processor.compile()
    }
    
    // getRIndex get right index from string slice
    func getRIndex(strs []string, str string) int {
    	for i := len(strs) - 1; i >= 0; i-- {
    		if strs[i] == str {
    			return i
    		}
    	}
    	return -1
    }
    
    func sortCallbacks(cs []*callback) (fns []func(*DB), err error) {
    	var (
    		names, sorted []string
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 26 03:33:36 GMT 2024
    - 8.6K bytes
    - Viewed (1)
  6. cni/pkg/nodeagent/podcgroupns.go

    		`(?:[[:^punct:]]*/*)*crio[[:punct:]]` +
    		// non-punctuation end of string, i.e., the container ID
    		`(?P<containerid>[[:^punct:]]+)$`),
    }
    
    func reSubMatchMap(r *regexp.Regexp, str string) map[string]string {
    	match := r.FindStringSubmatch(str)
    	if match == nil {
    		return nil
    	}
    	subMatchMap := make(map[string]string)
    	for i, name := range r.SubexpNames() {
    		if i != 0 {
    			subMatchMap[name] = match[i]
    		}
    	}
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 11K bytes
    - Viewed (0)
  7. internal/s3select/sql/value.go

    }
    
    // FromInt creates a Value from an int
    func FromInt(f int64) *Value {
    	return &Value{value: f}
    }
    
    // FromString creates a Value from a string
    func FromString(str string) *Value {
    	return &Value{value: str}
    }
    
    // FromBool creates a Value from a bool
    func FromBool(b bool) *Value {
    	return &Value{value: b}
    }
    
    // FromTimestamp creates a Value from a timestamp
    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)
  8. schema/callbacks_test.go

    	if err != nil {
    		t.Fatalf("failed to parse user with callback, got error %v", err)
    	}
    
    	for _, str := range []string{"BeforeSave", "AfterCreate"} {
    		if !reflect.Indirect(reflect.ValueOf(user)).FieldByName(str).Interface().(bool) {
    			t.Errorf("%v should be true", str)
    		}
    	}
    
    	for _, str := range []string{"BeforeCreate", "BeforeUpdate", "AfterUpdate", "AfterSave", "BeforeDelete", "AfterDelete", "AfterFind"} {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 939 bytes
    - Viewed (0)
  9. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  10. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 1.8K bytes
    - Viewed (0)
Back to top