Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for TrimSpace (0.14 sec)

  1. schema/utils.go

    		k := strings.TrimSpace(strings.ToUpper(values[0]))
    
    		if len(values) >= 2 {
    			settings[k] = strings.Join(values[1:], ":")
    		} else if k != "" {
    			settings[k] = k
    		}
    	}
    
    	return settings
    }
    
    func toColumns(val string) (results []string) {
    	if val != "" {
    		for _, v := range strings.Split(val, ",") {
    			results = append(results, strings.TrimSpace(v))
    		}
    	}
    	return
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Aug 19 13:35:14 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  2. schema/index.go

    }
    
    func parseFieldIndexes(field *Field) (indexes []Index, err error) {
    	for _, value := range strings.Split(field.Tag.Get("gorm"), ";") {
    		if value != "" {
    			v := strings.Split(value, ":")
    			k := strings.TrimSpace(strings.ToUpper(v[0]))
    			if k == "INDEX" || k == "UNIQUEINDEX" {
    				var (
    					name       string
    					tag        = strings.Join(v[1:], ":")
    					idx        = strings.Index(tag, ",")
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sun Feb 04 07:49:19 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  3. clause/clause_test.go

    		if _, ok := buildNamesMap[c.Name()]; !ok {
    			buildNames = append(buildNames, c.Name())
    			buildNamesMap[c.Name()] = true
    		}
    
    		stmt.AddClause(c)
    	}
    
    	stmt.Build(buildNames...)
    
    	if strings.TrimSpace(stmt.SQL.String()) != result {
    		t.Errorf("SQL expects %v got %v", result, stmt.SQL.String())
    	}
    
    	if !reflect.DeepEqual(stmt.Vars, vars) {
    		t.Errorf("Vars expects %+v got %v", stmt.Vars, vars)
    	}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Jun 02 02:50:38 GMT 2020
    - 1012 bytes
    - Viewed (0)
Back to top