- Sort Score
- Result 10 results
- Languages All
Results 161 - 170 of 1,387 for funcs (0.04 sec)
-
tests/serializer_test.go
} return nil } func (es EncryptedString) Value(ctx context.Context, field *schema.Field, dst reflect.Value, fieldValue interface{}) (interface{}, error) { return "hello" + string(es), nil } type CustomSerializer struct { prefix []byte } func NewCustomSerializer(prefix string) *CustomSerializer { return &CustomSerializer{prefix: []byte(prefix)} }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Apr 21 14:09:38 UTC 2023 - 7.6K bytes - Viewed (0) -
internal/store/batch_test.go
// along with this program. If not, see <http://www.gnu.org/licenses/>. package store import ( "context" "sync" "testing" "time" ) func TestBatchCommit(t *testing.T) { defer func() { if err := tearDownQueueStore(); err != nil { t.Fatalf("Failed to tear down store; %v", err) } }() store, err := setUpQueueStore(queueDir, 100) if err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 5.6K bytes - Viewed (0) -
internal/logger/logger.go
var ( quietFlag, jsonFlag, anonFlag bool // Custom function to format error errorFmtFunc func(string, error, bool) string ) // EnableQuiet - turns quiet option on. func EnableQuiet() { color.TurnOff() // no colored outputs necessary in quiet mode. quietFlag = true } // EnableJSON - outputs logs in json format. func EnableJSON() { color.TurnOff() // no colored outputs necessary in JSON mode. jsonFlag = true
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 22 09:43:48 UTC 2024 - 12.4K bytes - Viewed (0) -
schema/field.go
Schema *Schema EmbeddedSchema *Schema OwnerSchema *Schema ReflectValueOf func(context.Context, reflect.Value) reflect.Value ValueOf func(context.Context, reflect.Value) (value interface{}, zero bool) Set func(context.Context, reflect.Value, interface{}) error Serializer SerializerInterface NewValuePool FieldNewValuePool
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Apr 15 03:20:20 UTC 2024 - 32K bytes - Viewed (0) -
cmd/erasure-metadata.go
// GetChecksumInfo - get checksum of a part. func (e ErasureInfo) GetChecksumInfo(partNumber int) (ckSum ChecksumInfo) { for _, sum := range e.Checksums { if sum.PartNumber == partNumber { // Return the checksum return sum } } return ChecksumInfo{Algorithm: DefaultBitrotAlgorithm} } // ShardFileSize - returns final erasure size from original size. func (e ErasureInfo) ShardFileSize(totalLength int64) int64 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 31 22:10:24 UTC 2024 - 21.3K bytes - Viewed (0) -
cni/test/install_cni.go
} t.Logf("Created temporary dir: %v", tempDir) return tempDir } func ls(dir string, t *testing.T) []string { files, err := os.ReadDir(dir) t.Helper() if err != nil { t.Fatalf("Failed to list files, err: %v", err) } return slices.Map(files, func(e os.DirEntry) string { return e.Name() }) } func cp(src, dest string, t *testing.T) { t.Helper() data, err := os.ReadFile(src)
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Aug 01 18:38:14 UTC 2024 - 11.3K bytes - Viewed (0) -
internal/bucket/replication/replication.go
ExistingObjectReplicationType ResyncReplicationType AllReplicationType ) // Valid returns true if replication type is set func (t Type) Valid() bool { return t > 0 } // IsDataReplication returns true if content being replicated func (t Type) IsDataReplication() bool { switch t { case ObjectReplicationType, HealReplicationType, ExistingObjectReplicationType: return true }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Mar 28 17:44:56 UTC 2024 - 8.9K bytes - Viewed (0) -
internal/dsync/dsync-server_test.go
responseDelay int64 } func (l *lockServer) setRefreshReply(refreshed bool) { l.mutex.Lock() defer l.mutex.Unlock() l.lockNotFound = !refreshed } func (l *lockServer) setResponseDelay(responseDelay time.Duration) { atomic.StoreInt64(&l.responseDelay, int64(responseDelay)) } func (l *lockServer) Lock(args *LockArgs) (reply bool, err error) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jan 23 16:46:37 UTC 2023 - 8.3K bytes - Viewed (0) -
src/bytes/reader.go
// slice. func (r *Reader) Len() int { if r.i >= int64(len(r.s)) { return 0 } return int(int64(len(r.s)) - r.i) } // Size returns the original length of the underlying byte slice. // Size is the number of bytes available for reading via [Reader.ReadAt]. // The result is unaffected by any method calls except [Reader.Reset]. func (r *Reader) Size() int64 { return int64(len(r.s)) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Jul 16 18:17:37 UTC 2024 - 3.9K bytes - Viewed (0) -
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
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:03:42 UTC 2024 - 4.9K bytes - Viewed (0)