Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for trimTrace (0.5 sec)

  1. internal/logger/logger.go

    }
    
    func trimTrace(f string) string {
    	for _, trimString := range trimStrings {
    		f = strings.TrimPrefix(filepath.ToSlash(f), filepath.ToSlash(trimString))
    	}
    	return filepath.FromSlash(f)
    }
    
    func getSource(level int) string {
    	pc, file, lineNumber, ok := runtime.Caller(level)
    	if ok {
    		// Clean up the common prefixes
    		file = trimTrace(file)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat May 04 00:17:57 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  2. cmd/common-main.go

    func parsEnvEntry(envEntry string) (envKV, error) {
    	envEntry = strings.TrimSpace(envEntry)
    	if envEntry == "" {
    		// Skip all empty lines
    		return envKV{
    			Skip: true,
    		}, nil
    	}
    	if strings.HasPrefix(envEntry, "#") {
    		// Skip commented lines
    		return envKV{
    			Skip: true,
    		}, nil
    	}
    	envTokens := strings.SplitN(strings.TrimSpace(strings.TrimPrefix(envEntry, "export")), config.EnvSeparator, 2)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat May 04 00:17:57 GMT 2024
    - 35.8K bytes
    - Viewed (2)
  3. cmd/utils.go

    	}
    	return err
    }
    
    // returns 'true' if either string has space in the
    // - beginning of a string
    // OR
    // - end of a string
    func hasSpaceBE(s string) bool {
    	return strings.TrimSpace(s) != s
    }
    
    func request2BucketObjectName(r *http.Request) (bucketName, objectName string) {
    	path, err := getResource(r.URL.Path, r.Host, globalDomainNames)
    	if err != nil {
    		logger.CriticalIf(GlobalContext, err)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 15:18:21 GMT 2024
    - 31.4K bytes
    - Viewed (0)
  4. cmd/sftp-server.go

    	var filteredAlgos []string
    	found := false
    	for _, algo := range want {
    		if len(algo) == 0 {
    			continue
    		}
    		for _, allowedAlgo := range allowed {
    			algo := strings.ToLower(strings.TrimSpace(algo))
    			if algo == allowedAlgo {
    				filteredAlgos = append(filteredAlgos, algo)
    				found = true
    				break
    			}
    		}
    		if !found {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 11:07:40 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  5. cmd/handler-api.go

    	buf, err := os.ReadFile(cgroupV2MemLimitFile)
    	if err != nil {
    		buf, err = os.ReadFile(cgroupV1MemLimitFile)
    	}
    	if err != nil {
    		return 0
    	}
    	limit, err = strconv.ParseUint(strings.TrimSpace(string(buf)), 10, 64)
    	if err != nil {
    		// The kernel can return valid but non integer values
    		// but still, no need to interpret more
    		return 0
    	}
    	if limit == cgroupMemNoLimit {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 20:08:20 GMT 2024
    - 10K bytes
    - Viewed (0)
  6. docs/debugging/xl-meta/main.go

    				b0 := ""
    				if ndjson {
    					b, _ := json.Marshal(file)
    					b0 = fmt.Sprintf("%s: ", string(b))
    				}
    				b, err := decode(r, file)
    				if err != nil {
    					return err
    				}
    				b = bytes.TrimSpace(b)
    				if !ndjson {
    					b = bytes.TrimFunc(b, func(r rune) bool {
    						return r == '{' || r == '}' || r == '\n' || r == '\r'
    					})
    				}
    
    				toPrint = append(toPrint, fmt.Sprintf("%s%s", b0, string(b)))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 17:56:22 GMT 2024
    - 20.2K bytes
    - Viewed (1)
  7. migrator/migrator.go

    func (m Migrator) MigrateColumn(value interface{}, field *schema.Field, columnType gorm.ColumnType) error {
    	if field.IgnoreMigration {
    		return nil
    	}
    
    	// found, smart migrate
    	fullDataType := strings.TrimSpace(strings.ToLower(m.DB.Migrator().FullDataTypeOf(field).SQL))
    	realDataType := strings.ToLower(columnType.DatabaseTypeName())
    
    	var (
    		alterColumn bool
    		isSameType  = fullDataType == realDataType
    	)
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  8. cni/pkg/iptables/iptables.go

    	if isIpv4 {
    		data = iptablesBuilder.BuildV4Restore()
    	} else {
    		data = iptablesBuilder.BuildV6Restore()
    	}
    
    	log.Infof("Running %s with the following input:\n%v", iptVer.CmdToString(cmd), strings.TrimSpace(data))
    	// --noflush to prevent flushing/deleting previous contents from table
    	return cfg.ext.Run(cmd, iptVer, strings.NewReader(data), "--noflush", "-v")
    }
    
    func (cfg *IptablesConfigurator) addLoopbackRoute() error {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue May 07 19:54:50 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  9. cmd/iam-store.go

    }
    
    // converts a mapped policy into a slice of distinct policies
    func (mp MappedPolicy) toSlice() []string {
    	var policies []string
    	for _, policy := range strings.Split(mp.Policies, ",") {
    		if strings.TrimSpace(policy) == "" {
    			continue
    		}
    		policies = append(policies, policy)
    	}
    	return policies
    }
    
    func (mp MappedPolicy) policySet() set.StringSet {
    	return set.CreateStringSet(mp.toSlice()...)
    }
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Apr 27 10:04:10 GMT 2024
    - 75.2K bytes
    - Viewed (2)
  10. cmd/admin-handlers.go

    		return
    	}
    
    	sizeStr := r.Form.Get(peerRESTSize)
    	durationStr := r.Form.Get(peerRESTDuration)
    	concurrentStr := r.Form.Get(peerRESTConcurrent)
    	storageClass := strings.TrimSpace(r.Form.Get(peerRESTStorageClass))
    	customBucket := strings.TrimSpace(r.Form.Get(peerRESTBucket))
    	autotune := r.Form.Get("autotune") == "true"
    	noClear := r.Form.Get("noclear") == "true"
    	enableSha256 := r.Form.Get("enableSha256") == "true"
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 29 17:39:04 GMT 2024
    - 97.8K bytes
    - Viewed (2)
Back to top