- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 41 for TrimSuffix (0.12 sec)
-
internal/store/store.go
key.Compress = true key.Name = strings.TrimSuffix(key.Name, compressExt) } if key.ItemCount, _ = getItemCount(k); key.ItemCount > 1 { key.Name = strings.TrimPrefix(key.Name, fmt.Sprintf("%d:", key.ItemCount)) } if vals := strings.Split(key.Name, "."); len(vals) == 2 { key.Extension = "." + vals[1] key.Name = strings.TrimSuffix(key.Name, key.Extension) } return }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 4.2K bytes - Viewed (0) -
istioctl/pkg/writer/envoy/configdump/route.go
unique := sets.New(domains...) shouldDelete := sets.New[string]() for _, h := range domains { stripFull := strings.TrimSuffix(h, ".svc.cluster.local") if unique.Contains(stripFull) && stripFull != h { shouldDelete.Insert(h) } stripPartial := strings.TrimSuffix(h, ".svc") if unique.Contains(stripPartial) && stripPartial != h { shouldDelete.Insert(h) } }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Aug 08 20:44:50 UTC 2024 - 7.2K bytes - Viewed (0) -
cmd/metacache-walk.go
if !IsErrIgnored(err, io.EOF, io.ErrUnexpectedEOF) { internalLogOnceIf(ctx, err, "metacache-walk-read-metadata") } continue } meta.name = strings.TrimSuffix(entry, xlStorageFormatFile) meta.name = strings.TrimSuffix(meta.name, SlashSeparator) meta.name = pathJoinBuf(sb, current, meta.name) meta.name = decodeDirObject(meta.name) return send(meta) } // Check legacy.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Jun 01 05:17:37 UTC 2024 - 12.4K bytes - Viewed (0) -
docs/debugging/inspect/main.go
// Calculate the output file name var outputFileName string switch { case strings.HasSuffix(inputFileName, ".enc"): outputFileName = strings.TrimSuffix(inputFileName, ".enc") + ".zip" case strings.HasSuffix(inputFileName, ".zip"): outputFileName = strings.TrimSuffix(inputFileName, ".zip") + ".decrypted.zip" case strings.Contains(inputFileName, ".enc."): outputFileName = strings.Replace(inputFileName, ".enc.", ".", 1) + ".zip"
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 31 14:49:23 UTC 2024 - 5.2K bytes - Viewed (0) -
cmd/api-utils.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Mar 04 18:05:56 UTC 2024 - 2.8K bytes - Viewed (0) -
cmd/iam-object-store.go
mappedPolicies := make([]MappedPolicy, len(users)) g := errgroup.WithNErrs(len(users)) for index := range users { index := index g.Go(func() error { userName := strings.TrimSuffix(users[index], ".json") userMP, err := iamOS.loadMappedPolicyInternal(ctx, userName, userType, isGroup) if err != nil && !errors.Is(err, errNoSuchPolicy) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 10 23:40:37 UTC 2024 - 26.6K bytes - Viewed (0) -
internal/config/dns/etcd_dns.go
r, err := c.etcdClient.Get(ctx, key, clientv3.WithPrefix()) defer cancel() if err != nil { return nil, err } if r.Count == 0 { key = strings.TrimSuffix(key, etcdPathSeparator) r, err = c.etcdClient.Get(ctx, key) if err != nil { return nil, err } // only if we are looking at `domain` as true // we should return error here.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 26 15:03:08 UTC 2024 - 8K bytes - Viewed (0) -
cni/pkg/util/executil.go
externalCommand.Stdout = stdout externalCommand.Stderr = stderr err := externalCommand.Run() if err != nil || len(stderr.Bytes()) != 0 { return stderr.String(), err } return strings.TrimSuffix(stdout.String(), "\n"), err } func Execute(cmd string, args ...string) error { log.Debugf("Running command: %s %s", cmd, strings.Join(args, " ")) externalCommand := exec.Command(cmd, args...)
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Jan 26 20:34:28 UTC 2024 - 1.8K bytes - Viewed (0) -
src/bytes/example_test.go
// Output: a lone gopher } func ExampleTrimSuffix() { var b = []byte("Hello, goodbye, etc!") b = bytes.TrimSuffix(b, []byte("goodbye, etc!")) b = bytes.TrimSuffix(b, []byte("gopher")) b = append(b, bytes.TrimSuffix([]byte("world!"), []byte("x!"))...) os.Stdout.Write(b) // Output: Hello, world! } func ExampleTrimRight() {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 07 17:22:36 UTC 2024 - 14.9K bytes - Viewed (0) -
internal/config/heal/heal.go
case false: return -1, nil } } // Try to parse as a number of months if !strings.HasSuffix(s, "m") { return -1, errors.New("unknown format") } months, err := strconv.Atoi(strings.TrimSuffix(s, "m")) if err != nil { return -1, err } if months < minimumBitrotCycleInMonths { return -1, fmt.Errorf("minimum bitrot cycle is %d month(s)", minimumBitrotCycleInMonths) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 4.9K bytes - Viewed (0)