Search Options

Results per page
Sort
Preferred Languages
Advance

Results 901 - 910 of 1,423 for Func (0.04 sec)

  1. internal/ioutil/read_file.go

    // A successful call returns err == nil, not err == EOF.
    // Because ReadFile reads the whole file, it does not treat an EOF from Read
    // as an error to be reported.
    func ReadFileWithFileInfo(name string) ([]byte, fs.FileInfo, error) {
    	f, err := OsOpenFile(name, readMode, 0o666)
    	if err != nil {
    		return nil, nil, err
    	}
    	defer f.Close()
    
    	st, err := f.Stat()
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Dec 09 18:17:51 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  2. cmd/namespace-lock_test.go

    // following test. Adding new code before this test or changing its
    // position will cause the line number to change and the test to FAIL
    // Tests getSource().
    func TestGetSource(t *testing.T) {
    	currentSource := func() string { return getSource(2) }
    	gotSource := currentSource()
    	// Hard coded line number, 35, in the "expectedSource" value
    	expectedSource := "[namespace-lock_test.go:35:TestGetSource()]"
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Apr 23 18:58:53 UTC 2021
    - 3.1K bytes
    - Viewed (0)
  3. src/archive/tar/reader.go

    	default:
    		return n, err
    	}
    }
    
    func (fr *regFileReader) WriteTo(w io.Writer) (int64, error) {
    	return io.Copy(w, struct{ io.Reader }{fr})
    }
    
    // logicalRemaining implements fileState.logicalRemaining.
    func (fr regFileReader) logicalRemaining() int64 {
    	return fr.nb
    }
    
    // physicalRemaining implements fileState.physicalRemaining.
    func (fr regFileReader) physicalRemaining() int64 {
    	return fr.nb
    }
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Mar 08 01:59:14 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  4. cmd/http-tracer.go

    // redact LDAP password if part of string
    func redactLDAPPwd(s string) string {
    	parts := ldapPwdRegex.FindStringSubmatch(s)
    	if len(parts) > 3 {
    		return parts[1] + "LDAPPassword=*REDACTED*" + parts[3]
    	}
    	return s
    }
    
    // getOpName sanitizes the operation name for mc
    func getOpName(name string) (op string) {
    	op = strings.TrimPrefix(name, "github.com/minio/minio/cmd.")
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 24 17:13:00 UTC 2024
    - 6K bytes
    - Viewed (0)
  5. internal/logger/audit.go

    // SetAuditEntry sets Audit info in the context.
    func SetAuditEntry(ctx context.Context, audit *audit.Entry) context.Context {
    	if ctx == nil {
    		LogIf(context.Background(), "audit", fmt.Errorf("context is nil"))
    		return nil
    	}
    	return context.WithValue(ctx, contextAuditKey, audit)
    }
    
    // GetAuditEntry returns Audit entry if set.
    func GetAuditEntry(ctx context.Context) *audit.Entry {
    	if ctx != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 24 17:13:00 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  6. cni/pkg/log/uds_test.go

    	"os"
    	"path/filepath"
    	"strings"
    	"testing"
    	"time"
    
    	"istio.io/istio/cni/pkg/constants"
    	istiolog "istio.io/istio/pkg/log"
    	"istio.io/istio/pkg/ptr"
    	"istio.io/istio/pkg/test/util/assert"
    )
    
    func TestUDSLog(t *testing.T) {
    	// Start UDS log server
    	udsSockDir := t.TempDir()
    	udsSock := filepath.Join(udsSockDir, "cni.sock")
    	logger := NewUDSLogger(istiolog.DebugLevel)
    	stop := make(chan struct{})
    	defer close(stop)
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Jun 12 16:26:28 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  7. internal/auth/credentials_test.go

    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run("", func(t *testing.T) {
    			_, err := ExpToInt64(testCase.exp)
    			if err != nil && !testCase.expectedFailure {
    				t.Errorf("Expected success but got failure %s", err)
    			}
    			if err == nil && testCase.expectedFailure {
    				t.Error("Expected failure but got success")
    			}
    		})
    	}
    }
    
    func TestIsAccessKeyValid(t *testing.T) {
    	testCases := []struct {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Mar 01 21:09:42 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  8. cmd/os_windows.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package cmd
    
    import (
    	"os"
    	"path/filepath"
    	"syscall"
    )
    
    func access(name string) error {
    	_, err := os.Lstat(name)
    	return err
    }
    
    func osMkdirAll(dirPath string, perm os.FileMode, _ string) error {
    	// baseDir is not honored in windows platform
    	return os.MkdirAll(dirPath, perm)
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Oct 18 18:08:15 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  9. cmd/batch-handlers_test.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package cmd
    
    import (
    	"slices"
    	"testing"
    
    	"gopkg.in/yaml.v3"
    )
    
    func TestBatchJobPrefix_UnmarshalYAML(t *testing.T) {
    	type args struct {
    		yamlStr string
    	}
    	type PrefixTemp struct {
    		Prefix BatchJobPrefix `yaml:"prefix"`
    	}
    	tests := []struct {
    		name    string
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 01 12:53:30 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  10. internal/amztime/iso8601_time_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 amztime
    
    import (
    	"testing"
    	"time"
    )
    
    func TestISO8601Format(t *testing.T) {
    	testCases := []struct {
    		date           time.Time
    		expectedOutput string
    	}{
    		{
    			date:           time.Date(2009, time.November, 13, 4, 51, 1, 940303531, time.UTC),
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Dec 12 18:28:30 UTC 2022
    - 1.8K bytes
    - Viewed (0)
Back to top