Debian Codegraph @

t/cmd/lfstest-getlimit.go

raw symbols SCIP
1 //go:build testtools
2 // +build testtools
3
4 package main
5
6 import (
7 "bufio"
8 "fmt"
9 "os"
10 "strings"
11
12 "github.com/git-lfs/git-lfs/v3/lfs"
13 "github.com/git-lfs/git-lfs/v3/tools"
14 "github.com/git-lfs/pktline"
15 )
16
17 func main() {
18 if len(os.Args) == 2 {
19 switch os.Args[1] {
20 case "--max-bufio-scan-token-size":
21 fmt.Print(bufio.MaxScanTokenSize)
22 case "--max-pktline-len":
23 fmt.Print(pktline.MaxPacketLength)
24 case "--max-pointer-size":
25 fmt.Print(lfs.BlobSizeCutoff)
26 case "--max-spool-mem-buffer-size":
27 fmt.Print(tools.MemoryBufferLimit)
28 default:
29 fmt.Fprintf(os.Stderr, "unknown argument: %s\n", os.Args[1])
30 os.Exit(1)
31 }
32 } else {
33 fmt.Fprintf(os.Stderr, "invalid arguments: %s\n", strings.Join(os.Args, " "))
34 os.Exit(1)
35 }
36
37 os.Exit(0)
38 }