list jobTypes currently supported (#4298)
This commit is contained in:
@@ -19,6 +19,7 @@ package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/madmin-go"
|
||||
@@ -38,6 +39,8 @@ var batchGenerateCmd = cli.Command{
|
||||
USAGE:
|
||||
{{.HelpName}} TARGET JOBTYPE
|
||||
|
||||
JOBTYPE:
|
||||
` + supportedJobTypes() + `
|
||||
FLAGS:
|
||||
{{range .VisibleFlags}}{{.}}
|
||||
{{end}}
|
||||
@@ -47,6 +50,16 @@ EXAMPLES:
|
||||
`,
|
||||
}
|
||||
|
||||
func supportedJobTypes() string {
|
||||
var builder strings.Builder
|
||||
for _, jobType := range madmin.SupportedJobTypes {
|
||||
builder.WriteString(" - ")
|
||||
builder.WriteString(string(jobType))
|
||||
builder.WriteString("\n")
|
||||
}
|
||||
return builder.String()
|
||||
}
|
||||
|
||||
// checkBatchGenerateSyntax - validate all the passed arguments
|
||||
func checkBatchGenerateSyntax(ctx *cli.Context) {
|
||||
if len(ctx.Args()) != 2 {
|
||||
|
||||
@@ -19,7 +19,7 @@ require (
|
||||
github.com/minio/cli v1.24.0
|
||||
github.com/minio/colorjson v1.0.2
|
||||
github.com/minio/filepath v1.0.0
|
||||
github.com/minio/madmin-go v1.6.0
|
||||
github.com/minio/madmin-go v1.6.4
|
||||
github.com/minio/md5-simd v1.1.2 // indirect
|
||||
github.com/minio/minio-go/v7 v7.0.40-0.20220928095841-8848d8affe8a
|
||||
github.com/minio/pkg v1.4.5
|
||||
|
||||
@@ -342,8 +342,8 @@ github.com/minio/colorjson v1.0.2/go.mod h1:JWxcL2n8T8JVf+NY6awl6kn5nK49aAzHOeQE
|
||||
github.com/minio/filepath v1.0.0 h1:fvkJu1+6X+ECRA6G3+JJETj4QeAYO9sV43I79H8ubDY=
|
||||
github.com/minio/filepath v1.0.0/go.mod h1:/nRZA2ldl5z6jT9/KQuvZcQlxZIMQoFFQPvEXx9T/Bw=
|
||||
github.com/minio/madmin-go v1.3.5/go.mod h1:vGKGboQgGIWx4DuDUaXixjlIEZOCIp6ivJkQoiVaACc=
|
||||
github.com/minio/madmin-go v1.6.0 h1:ut2rCN5Aw5dhAJ8UIQ8appF1A/+fpSD9Alg2p+huab0=
|
||||
github.com/minio/madmin-go v1.6.0/go.mod h1:ez87VmMtsxP7DRxjKJKD4RDNW+nhO2QF9KSzwxBDQ98=
|
||||
github.com/minio/madmin-go v1.6.4 h1:s9xY/I4XcU/hWN8A6QRcL4JJ+7c5VPUKNTOqjzh91JE=
|
||||
github.com/minio/madmin-go v1.6.4/go.mod h1:FVl1TS8T79779KZEboPHL5byffHJ6DyrAAavqgsG6UQ=
|
||||
github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw=
|
||||
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
|
||||
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
|
||||
|
||||
Reference in New Issue
Block a user