Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1021 - 1030 of 1,179 for _func (0.05 sec)

  1. internal/s3select/csv/recordtransform.go

    type recordTransform struct {
    	reader io.Reader
    	// recordDelimiter can be up to 2 characters.
    	recordDelimiter []byte
    	oneByte         []byte
    	useOneByte      bool
    }
    
    func (rr *recordTransform) Read(p []byte) (n int, err error) {
    	if rr.useOneByte {
    		p[0] = rr.oneByte[0]
    		rr.useOneByte = false
    		n, err = rr.reader.Read(p[1:])
    		n++
    	} else {
    		n, err = rr.reader.Read(p)
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jun 01 21:59:40 UTC 2021
    - 2.1K bytes
    - Viewed (0)
  2. internal/s3select/csv/reader_contrib_test.go

    				t.Errorf("Case %d failed: expected %v results %v", i, c.totalFields, fields)
    			}
    		})
    	}
    }
    
    type errReader struct {
    	err error
    }
    
    func (e errReader) Read(p []byte) (n int, err error) {
    	return 0, e.err
    }
    
    func TestReadFailures(t *testing.T) {
    	customErr := errors.New("unable to read file :(")
    	cases := []struct {
    		file            string
    		recordDelimiter string
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 19 18:05:16 UTC 2022
    - 38.5K bytes
    - Viewed (0)
  3. cmd/tier_test.go

    //
    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package cmd
    
    import (
    	"testing"
    	"time"
    )
    
    func TestTierMetrics(t *testing.T) {
    	tier := "WARM-1"
    	globalTierMetrics.Observe(tier, 200*time.Millisecond)
    	expSuccess := 10
    	expFailure := 5
    	for i := 0; i < expSuccess; i++ {
    		globalTierMetrics.logSuccess(tier)
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Dec 21 04:13:40 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  4. src/archive/tar/example_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package tar_test
    
    import (
    	"archive/tar"
    	"bytes"
    	"fmt"
    	"io"
    	"log"
    	"os"
    )
    
    func Example_minimal() {
    	// Create and add some files to the archive.
    	var buf bytes.Buffer
    	tw := tar.NewWriter(&buf)
    	var files = []struct {
    		Name, Body string
    	}{
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Nov 16 16:54:08 UTC 2017
    - 1.4K bytes
    - Viewed (0)
  5. cmd/storage-errors.go

    // errXLBackend XL drive mode requires fresh deployment.
    var errXLBackend = errors.New("XL backend requires fresh drive")
    
    // StorageErr represents error generated by xlStorage call.
    type StorageErr string
    
    func (h StorageErr) Error() string {
    	return string(h)
    }
    
    // Collection of basic errors.
    var baseErrs = []error{
    	errDiskNotFound,
    	errFaultyDisk,
    	errFaultyRemoteDisk,
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Apr 04 12:04:40 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  6. cmd/api-headers_test.go

    //
    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package cmd
    
    import (
    	"testing"
    )
    
    func TestNewRequestID(t *testing.T) {
    	// Ensure that it returns an alphanumeric result of length 16.
    	id := mustGetRequestID(UTCNow())
    
    	if len(id) != 16 {
    		t.Fail()
    	}
    
    	var e rune
    	for _, char := range id {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Jan 02 17:15:06 UTC 2022
    - 1.1K bytes
    - Viewed (0)
  7. internal/disk/disk_unix.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package disk
    
    import (
    	"syscall"
    )
    
    // SameDisk reports whether di1 and di2 describe the same disk.
    func SameDisk(disk1, disk2 string) (bool, error) {
    	st1 := syscall.Stat_t{}
    	st2 := syscall.Stat_t{}
    
    	if err := syscall.Stat(disk1, &st1); err != nil {
    		return false, err
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 19 01:35:22 UTC 2021
    - 1.2K bytes
    - Viewed (0)
  8. tests/distinct_test.go

    package tests_test
    
    import (
    	"regexp"
    	"testing"
    
    	"gorm.io/gorm"
    	. "gorm.io/gorm/utils/tests"
    )
    
    func TestDistinct(t *testing.T) {
    	users := []User{
    		*GetUser("distinct", Config{}),
    		*GetUser("distinct", Config{}),
    		*GetUser("distinct", Config{}),
    		*GetUser("distinct-2", Config{}),
    		*GetUser("distinct-3", Config{}),
    	}
    	users[0].Age = 20
    
    	if err := DB.Create(&users).Error; err != nil {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Jan 06 07:02:53 UTC 2022
    - 2.5K bytes
    - Viewed (0)
  9. cmd/http-tracer_test.go

    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package cmd
    
    import (
    	"testing"
    )
    
    // Test redactLDAPPwd()
    func TestRedactLDAPPwd(t *testing.T) {
    	testCases := []struct {
    		query         string
    		expectedQuery string
    	}{
    		{"", ""},
    		{
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Jan 02 17:15:06 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  10. internal/config/storageclass/help.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package storageclass
    
    import "github.com/minio/minio/internal/config"
    
    // Help template for storageclass feature.
    var (
    	defaultHelpPostfix = func(key string) string {
    		return config.DefaultHelpPostfix(DefaultKVS, key)
    	}
    
    	Help = config.HelpKVS{
    		config.HelpKV{
    			Key:         ClassStandard,
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Mar 26 22:06:19 UTC 2024
    - 1.8K bytes
    - Viewed (0)
Back to top