- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for FieldsFunc (0.29 sec)
-
utils/utils_test.go
"errors" "math" "strings" "testing" "time" ) func TestIsValidDBNameChar(t *testing.T) { for _, db := range []string{"db", "dbName", "db_name", "db1", "1dbname", "db$name"} { if fields := strings.FieldsFunc(db, IsValidDBNameChar); len(fields) != 1 { t.Fatalf("failed to parse db name %v", db) } } } func TestCheckTruth(t *testing.T) { checkTruthTests := []struct { v string out bool }{
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Feb 19 03:42:25 GMT 2024 - 3.6K bytes - Viewed (0) -
chainable_api.go
func (db *DB) Omit(columns ...string) (tx *DB) { tx = db.getInstance() if len(columns) == 1 && strings.ContainsRune(columns[0], ',') { tx.Statement.Omits = strings.FieldsFunc(columns[0], utils.IsValidDBNameChar) } else { tx.Statement.Omits = columns } return } // Where add conditions //
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Wed Apr 17 03:38:55 GMT 2024 - 14.3K bytes - Viewed (1) -
src/bytes/bytes.go
a[na] = s[fieldStart:len(s):len(s)] } return a } // FieldsFunc interprets s as a sequence of UTF-8-encoded code points. // It splits the slice s at each run of code points c satisfying f(c) and // returns a slice of subslices of s. If all code points in s satisfy f(c), or // len(s) == 0, an empty slice is returned. // // FieldsFunc makes no guarantees about the order in which it calls f(c)
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Mon Feb 19 19:51:15 GMT 2024 - 33.8K bytes - Viewed (0) -
finisher_api.go
expr := clause.Expr{SQL: "count(*)"} if len(tx.Statement.Selects) == 1 { dbName := tx.Statement.Selects[0] fields := strings.FieldsFunc(dbName, utils.IsValidDBNameChar) if len(fields) == 1 || (len(fields) == 3 && (strings.ToUpper(fields[1]) == "AS" || fields[1] == ".")) { if tx.Statement.Parse(tx.Statement.Model) == nil {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 22.7K bytes - Viewed (0) -
src/bytes/bytes_test.go
} } } } func TestFieldsFunc(t *testing.T) { for _, tt := range fieldstests { a := FieldsFunc([]byte(tt.s), unicode.IsSpace) result := sliceOfString(a) if !eq(result, tt.a) { t.Errorf("FieldsFunc(%q, unicode.IsSpace) = %v; want %v", tt.s, a, tt.a) continue } } pred := func(c rune) bool { return c == 'X' } var fieldsFuncTests = []FieldsTest{
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Wed Jan 24 16:07:25 GMT 2024 - 56.2K bytes - Viewed (0) -
src/bytes/example_test.go
// Output: Fields are: ["foo" "bar" "baz"] } func ExampleFieldsFunc() { f := func(c rune) bool { return !unicode.IsLetter(c) && !unicode.IsNumber(c) } fmt.Printf("Fields are: %q", bytes.FieldsFunc([]byte(" foo1;bar2,baz3..."), f)) // Output: Fields are: ["foo1" "bar2" "baz3"] } func ExampleHasPrefix() { fmt.Println(bytes.HasPrefix([]byte("Gopher"), []byte("Go")))
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Mon Mar 04 15:54:40 GMT 2024 - 15K bytes - Viewed (1) -
api/go1.txt
pkg bytes, func Count([]uint8, []uint8) int pkg bytes, func Equal([]uint8, []uint8) bool pkg bytes, func EqualFold([]uint8, []uint8) bool pkg bytes, func Fields([]uint8) [][]uint8 pkg bytes, func FieldsFunc([]uint8, func(int32) bool) [][]uint8 pkg bytes, func HasPrefix([]uint8, []uint8) bool pkg bytes, func HasSuffix([]uint8, []uint8) bool pkg bytes, func Index([]uint8, []uint8) int
Plain Text - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Wed Aug 14 18:58:28 GMT 2013 - 1.7M bytes - Viewed (1)