- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for MatchString (0.13 sec)
-
tests/query_test.go
if !regexp.MustCompile("SELECT .*id.*name.*updated_at.*created_at.* FROM .*users").MatchString(result.Statement.SQL.String()) { t.Fatalf("SQL should include selected names, but got %v", result.Statement.SQL.String()) } result = DB.Session(&gorm.Session{DryRun: true}).Model(&User{}).Find(&User{}, user.ID) if regexp.MustCompile("SELECT .*name.* FROM .*users").MatchString(result.Statement.SQL.String()) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 50.4K bytes - Viewed (0) -
tests/preload_test.go
if r, err := json.Marshal(&user); err != nil { t.Errorf("failed to marshal users, got error %v", err) } else if !regexp.MustCompile(`"Team":\[\],"Languages":\[\],"Friends":\[\]`).MatchString(string(r)) { t.Errorf("json marshal is not empty slice, got %v", string(r)) } var results []User DB.Preload("Team").Preload("Languages").Preload("Friends").Find(&results, "name = ?", user.Name)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:00:47 UTC 2024 - 15.9K bytes - Viewed (0) -
internal/event/target/postgresql.go
} var errInvalidPsqlTablename = errors.New("invalid PostgreSQL table") func validatePsqlTableName(name string) error { // check for quoted string (string may not contain a quote) if match, err := regexp.MatchString("^\"[^\"]+\"$", name); err != nil { return err } else if match { return nil } // normalize the name to letters, digits, _ or $ valid := true cleaned := strings.Map(func(r rune) rune {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 13.3K bytes - Viewed (0) -
tests/joins_test.go
if !regexp.MustCompile("SELECT .* FROM .users. left join pets.*join accounts.*").MatchString(stmt.SQL.String()) { t.Errorf("joins should be ordered, but got %v", stmt.SQL.String()) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 17 03:58:13 UTC 2024 - 15K bytes - Viewed (0) -
internal/http/listener_test.go
ip = v.IP } if ip.To4() != nil { localIP4.Add(ip.String()) } } // Filter ipList by IPs those do not start with '127.'. nonLoopBackIPs := localIP4.FuncMatch(func(ip string, matchString string) bool { return !strings.HasPrefix(ip, "127.") }, "") if len(nonLoopBackIPs) == 0 { t.Fatalf("No non-loop back IP address found for this host") } nonLoopBackIP := nonLoopBackIPs.ToSlice()[0]
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jun 10 17:41:02 UTC 2024 - 11.8K bytes - Viewed (0) -
istioctl/pkg/validate/validate_test.go
t.Errorf("unexpected validate return status: got %v want %v: \nerr=%v", err != nil, c.wantError, err) } output := out.String() if c.expectedRegexp != nil && !c.expectedRegexp.MatchString(output) { t.Errorf("Output didn't match for 'istioctl %s'\n got %v\nwant: %v", strings.Join(c.args, " "), output, c.expectedRegexp) } }) } } func TestGetTemplateLabels(t *testing.T) {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Aug 02 16:18:14 UTC 2024 - 21.4K bytes - Viewed (0) -
internal/config/identity/plugin/config.go
bs := h.Sum(nil) resourceID += base64.RawURLEncoding.EncodeToString(bs) } else { // Check that the roleID is restricted to URL safe characters // (base64 URL encoding chars). if !validRoleIDRegex.MatchString(roleID) { return args, config.Errorf("Role ID must match the regexp `^[a-zA-Z0-9_-]+$`") } // Use the user provided ID here. resourceID += roleID }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 13.3K bytes - Viewed (0) -
schema/relationship.go
// In order to avoid the performance problems caused by repeated compilation of regular expressions, // it only needs to be done once outside, so optimization is done here. if idx != -1 && regEnLetterAndMidline.MatchString(str[0:idx]) { name = str[0:idx] } else { name = rel.Schema.namer.RelationshipFKName(*rel) } constraint := Constraint{ Name: name, Field: rel.Field,
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 03:46:59 UTC 2024 - 22.7K bytes - Viewed (0) -
internal/config/config.go
} if region != "" { if !validRegionRegex.MatchString(region) { err = Errorf( "region '%s' is invalid, expected simple characters such as [us-east-1, myregion...]", region) return } s.region = region } name := env.Get(EnvSiteName, siteKV.Get(NameKey)) if name != "" { if !validSiteNameRegex.MatchString(name) { err = Errorf(
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 03 18:23:41 UTC 2024 - 37.7K bytes - Viewed (0) -
src/cmd/api/main_test.go
// - 'go list std' does not include commands, which cannot be // imported anyway. if ip := pkg.ImportPath; pkg.Standard && ip != "unsafe" && !strings.HasPrefix(ip, "vendor/") && !internalPkg.MatchString(ip) { stdPackages = append(stdPackages, ip) } importDir[pkg.ImportPath] = pkg.Dir if len(pkg.ImportMap) > 0 { importMap[pkg.Dir] = make(map[string]string, len(pkg.ImportMap)) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Sep 04 18:16:59 UTC 2024 - 31.4K bytes - Viewed (0)