Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 58 for HasSuffix (0.18 sec)

  1. cmd/ftp-server-driver.go

    }
    
    func buildMinioPath(p string) string {
    	return strings.TrimPrefix(p, SlashSeparator)
    }
    
    func buildMinioDir(p string) string {
    	v := buildMinioPath(p)
    	if !strings.HasSuffix(v, SlashSeparator) {
    		return v + SlashSeparator
    	}
    	return v
    }
    
    type minioFileInfo struct {
    	p     string
    	info  minio.ObjectInfo
    	isDir bool
    }
    
    func (m *minioFileInfo) Name() string {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 12:23:42 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  2. istioctl/pkg/multixds/google.go

    package multixds
    
    import (
    	"fmt"
    	"net/url"
    	"strings"
    )
    
    func isMCPAddr(u *url.URL) bool {
    	return strings.HasSuffix(u.Host, ".googleapis.com") || strings.HasSuffix(u.Host, ".googleapis.com:443")
    }
    
    func parseMCPAddr(u *url.URL) (*xdsAddr, error) {
    	ret := &xdsAddr{host: u.Host}
    	if !strings.HasSuffix(ret.host, ":443") {
    		ret.host += ":443"
    	}
    	const projSeg = "/projects/"
    	i := strings.Index(u.Path, projSeg)
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Mon Jun 06 03:39:27 GMT 2022
    - 1.5K bytes
    - Viewed (1)
  3. cmd/metacache-walk.go

    			return ctx.Err()
    		case out <- entry:
    		}
    		return nil
    	}
    
    	// Fast exit track to check if we are listing an object with
    	// a trailing slash, this will avoid to list the object content.
    	if HasSuffix(opts.BaseDir, SlashSeparator) {
    		metadata, err := s.readMetadata(ctx, pathJoin(volumeDir,
    			opts.BaseDir[:len(opts.BaseDir)-1]+globalDirSuffix,
    			xlStorageFormatFile))
    		diskHealthCheckOK(ctx, err)
    		if err == nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  4. cni/pkg/install/cniconfig.go

    	for !file.Exists(cniConfigFilepath) {
    		if strings.HasSuffix(cniConfigFilepath, ".conf") && file.Exists(cniConfigFilepath+"list") {
    			installLog.Infof("%s doesn't exist, but %[1]slist does; Using it as the CNI config file instead.", cniConfigFilepath)
    			cniConfigFilepath += "list"
    		} else if strings.HasSuffix(cniConfigFilepath, ".conflist") && file.Exists(cniConfigFilepath[:len(cniConfigFilepath)-4]) {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  5. istioctl/pkg/xds/client.go

    	if opts.Plaintext || opts.CertDir != "" {
    		return make([]grpc.DialOption, 0), nil
    	}
    	// Use bearer token
    	aud := tokenAudiences
    	isMCP := strings.HasSuffix(opts.Xds, ".googleapis.com") || strings.HasSuffix(opts.Xds, ".googleapis.com:443")
    	if isMCP {
    		// Special credentials handling when using ASM Managed Control Plane.
    		mem, err := getHubMembership(ctx, kubeClient)
    		if err != nil {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Tue Dec 19 22:42:42 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  6. lib/time/mkzip.go

    	if len(args) != 1 || !strings.HasSuffix(args[0], ".zip") {
    		usage()
    	}
    
    	var zb bytes.Buffer
    	zw := zip.NewWriter(&zb)
    	seen := make(map[string]bool)
    	err := filepath.WalkDir(".", func(path string, d fs.DirEntry, err error) error {
    		if d.IsDir() {
    			return nil
    		}
    		data, err := os.ReadFile(path)
    		if err != nil {
    			log.Fatal(err)
    		}
    		if strings.HasSuffix(path, ".zip") {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Mar 04 17:32:07 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  7. docs/debugging/inspect/main.go

    	default:
    		flag.Usage()
    		fatalIf(true, "Only 1 file can be decrypted")
    		os.Exit(1)
    	}
    
    	// Calculate the output file name
    	switch {
    	case strings.HasSuffix(inputFileName, ".enc"):
    		outputFileName = strings.TrimSuffix(inputFileName, ".enc") + ".zip"
    	case strings.HasSuffix(inputFileName, ".zip"):
    		outputFileName = strings.TrimSuffix(inputFileName, ".zip") + ".decrypted.zip"
    	}
    
    	// Backup any already existing output file
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 11 21:22:47 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  8. utils/utils.go

    	// the second caller usually from gorm internal, so set i start from 2
    	for i := 2; i < 15; i++ {
    		_, file, line, ok := runtime.Caller(i)
    		if ok && (!strings.HasPrefix(file, gormSourceDir) || strings.HasSuffix(file, "_test.go")) &&
    			!strings.HasSuffix(file, ".gen.go") {
    			return file + ":" + strconv.FormatInt(int64(line), 10)
    		}
    	}
    
    	return ""
    }
    
    func IsValidDBNameChar(c rune) bool {
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Mon Feb 19 03:42:25 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  9. docs/debugging/healing-bin/main.go

    		if !c.Args().Present() {
    			cli.ShowAppHelpAndExit(c, 1) // last argument is exit code
    		}
    
    		ht := make(map[string]map[string]interface{})
    		file := c.Args().Get(0)
    		if strings.HasSuffix(file, ".zip") {
    			var sz int64
    			f, err := os.Open(file)
    			if err != nil {
    				return err
    			}
    			if st, err := f.Stat(); err == nil {
    				sz = st.Size()
    			}
    			defer f.Close()
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.2K bytes
    - Viewed (0)
  10. cmd/utils.go

    // For ex. "prefix/" is stored as "prefix__XLDIR__"
    func encodeDirObject(object string) string {
    	if HasSuffix(object, slashSeparator) {
    		return strings.TrimSuffix(object, slashSeparator) + globalDirSuffix
    	}
    	return object
    }
    
    // Reverse process of encodeDirObject()
    func decodeDirObject(object string) string {
    	if HasSuffix(object, globalDirSuffix) {
    		return strings.TrimSuffix(object, globalDirSuffix) + slashSeparator
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Apr 21 11:43:18 GMT 2024
    - 32K bytes
    - Viewed (0)
Back to top