fix indentation/help across commands (#3512)
This commit is contained in:
+1
-1
@@ -19,8 +19,8 @@ package cmd
|
||||
import "github.com/minio/cli"
|
||||
|
||||
var adminBucketSubcommands = []cli.Command{
|
||||
adminBucketQuotaCmd,
|
||||
adminBucketRemoteCmd,
|
||||
adminBucketQuotaCmd,
|
||||
}
|
||||
|
||||
var adminBucketCmd = cli.Command{
|
||||
|
||||
+9
-9
@@ -69,20 +69,20 @@ FLAGS:
|
||||
{{range .VisibleFlags}}{{.}}
|
||||
{{end}}
|
||||
ENVIRONMENT VARIABLES:
|
||||
MC_ENCRYPT_KEY: list of comma delimited prefix=secret values
|
||||
MC_ENCRYPT_KEY: list of comma delimited prefix=secret values
|
||||
|
||||
EXAMPLES:
|
||||
1. Summarize disk usage of 'jazz-songs' bucket recursively.
|
||||
{{.Prompt}} {{.HelpName}} s3/jazz-songs
|
||||
1. Summarize disk usage of 'jazz-songs' bucket recursively.
|
||||
{{.Prompt}} {{.HelpName}} s3/jazz-songs
|
||||
|
||||
2. Summarize disk usage of 'louis' prefix in 'jazz-songs' bucket upto two levels.
|
||||
{{.Prompt}} {{.HelpName}} --depth=2 s3/jazz-songs/louis/
|
||||
2. Summarize disk usage of 'louis' prefix in 'jazz-songs' bucket upto two levels.
|
||||
{{.Prompt}} {{.HelpName}} --depth=2 s3/jazz-songs/louis/
|
||||
|
||||
3. Summarize disk usage of 'jazz-songs' bucket at a fixed date/time
|
||||
{{.Prompt}} {{.HelpName}} --rewind "2020.01.01" s3/jazz-songs/
|
||||
3. Summarize disk usage of 'jazz-songs' bucket at a fixed date/time
|
||||
{{.Prompt}} {{.HelpName}} --rewind "2020.01.01" s3/jazz-songs/
|
||||
|
||||
4. Summarize disk usage of 'jazz-songs' bucket with all objects versions
|
||||
{{.Prompt}} {{.HelpName}} --versions s3/jazz-songs/
|
||||
4. Summarize disk usage of 'jazz-songs' bucket with all objects versions
|
||||
{{.Prompt}} {{.HelpName}} --versions s3/jazz-songs/
|
||||
`,
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -59,9 +59,9 @@ EXAMPLES:
|
||||
--storage-class "GLACIER" s3/mybucket/doc
|
||||
|
||||
4. Add expiry and transition days rules on a prefix in mybucket for a MinIO transition target specified by label "hdd_tier".
|
||||
"hdd_tier" is the label specified when adding a remote target with "mc admin bucket remote add --service ilm --label hdd_tier"
|
||||
"hdd_tier" is the label specified when adding a remote target with "mc admin bucket remote add --service ilm --label hdd_tier"
|
||||
{{.Prompt}} {{.HelpName}} --expiry-days "300" --transition-days "200" \
|
||||
--storage-class "hdd_tier" myminio/mybucket/doc
|
||||
--storage-class "hdd_tier" myminio/mybucket/doc
|
||||
`,
|
||||
}
|
||||
|
||||
|
||||
@@ -44,17 +44,15 @@ FLAGS:
|
||||
{{range .VisibleFlags}}{{.}}
|
||||
{{end}}
|
||||
DESCRIPTION:
|
||||
modify a lifecycle configuration rule with given id.
|
||||
Modify a lifecycle configuration rule with given id.
|
||||
|
||||
EXAMPLES:
|
||||
1. Modify the expiration date for an existing rule with id "rHTY.a123".
|
||||
{{.Prompt}} {{.HelpName}} --id "rHTY.a123" \
|
||||
--expiry-date "2020-09-17" s3/mybucket
|
||||
{{.Prompt}} {{.HelpName}} --id "rHTY.a123" --expiry-date "2020-09-17" s3/mybucket
|
||||
|
||||
2. Modify the expiration and transition days for an existing rule with id "hGHKijqpo123".
|
||||
{{.Prompt}} {{.HelpName}} --id "hGHKijqpo123" \
|
||||
--expiry-days "300" --transition-days "200" \
|
||||
--storage-class "GLACIER" s3/mybucket
|
||||
{{.Prompt}} {{.HelpName}} --id "hGHKijqpo123" --expiry-days "300" \
|
||||
--transition-days "200" --storage-class "GLACIER" s3/mybucket
|
||||
`,
|
||||
}
|
||||
|
||||
@@ -93,7 +93,6 @@ EXAMPLES:
|
||||
|
||||
8. List all contents versions if the bucket versioning is enabled.
|
||||
{{.Prompt}} {{.HelpName}} --versions s3/mybucket
|
||||
|
||||
`,
|
||||
}
|
||||
|
||||
|
||||
+18
-18
@@ -67,32 +67,32 @@ FILE:
|
||||
A valid S3 policy JSON filepath.
|
||||
|
||||
EXAMPLES:
|
||||
1. Set bucket to "download" on Amazon S3 cloud storage.
|
||||
{{.Prompt}} {{.HelpName}} set download s3/burningman2011
|
||||
1. Set bucket to "download" on Amazon S3 cloud storage.
|
||||
{{.Prompt}} {{.HelpName}} set download s3/burningman2011
|
||||
|
||||
2. Set bucket to "public" on Amazon S3 cloud storage.
|
||||
{{.Prompt}} {{.HelpName}} set public s3/shared
|
||||
2. Set bucket to "public" on Amazon S3 cloud storage.
|
||||
{{.Prompt}} {{.HelpName}} set public s3/shared
|
||||
|
||||
3. Set bucket to "upload" on Amazon S3 cloud storage.
|
||||
{{.Prompt}} {{.HelpName}} set upload s3/incoming
|
||||
3. Set bucket to "upload" on Amazon S3 cloud storage.
|
||||
{{.Prompt}} {{.HelpName}} set upload s3/incoming
|
||||
|
||||
4. Set policy to "public" for bucket with prefix on Amazon S3 cloud storage.
|
||||
{{.Prompt}} {{.HelpName}} set public s3/public-commons/images
|
||||
4. Set policy to "public" for bucket with prefix on Amazon S3 cloud storage.
|
||||
{{.Prompt}} {{.HelpName}} set public s3/public-commons/images
|
||||
|
||||
5. Set a custom prefix based bucket policy on Amazon S3 cloud storage using a JSON file.
|
||||
{{.Prompt}} {{.HelpName}} set-json /path/to/policy.json s3/public-commons/images
|
||||
5. Set a custom prefix based bucket policy on Amazon S3 cloud storage using a JSON file.
|
||||
{{.Prompt}} {{.HelpName}} set-json /path/to/policy.json s3/public-commons/images
|
||||
|
||||
6. Get bucket permissions.
|
||||
{{.Prompt}} {{.HelpName}} get s3/shared
|
||||
6. Get bucket permissions.
|
||||
{{.Prompt}} {{.HelpName}} get s3/shared
|
||||
|
||||
7. Get bucket permissions in JSON format.
|
||||
{{.Prompt}} {{.HelpName}} get-json s3/shared
|
||||
7. Get bucket permissions in JSON format.
|
||||
{{.Prompt}} {{.HelpName}} get-json s3/shared
|
||||
|
||||
8. List policies set to a specified bucket.
|
||||
{{.Prompt}} {{.HelpName}} list s3/shared
|
||||
8. List policies set to a specified bucket.
|
||||
{{.Prompt}} {{.HelpName}} list s3/shared
|
||||
|
||||
9. List public object URLs recursively.
|
||||
{{.Prompt}} {{.HelpName}} --recursive links s3/shared/
|
||||
9. List public object URLs recursively.
|
||||
{{.Prompt}} {{.HelpName}} --recursive links s3/shared/
|
||||
`,
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,6 @@ EXAMPLES:
|
||||
|
||||
5. Set default lock retention configuration for a bucket
|
||||
$ {{.HelpName}} --default governance 30d myminio/mybucket/
|
||||
|
||||
`}
|
||||
|
||||
func parseSetRetentionArgs(cliCtx *cli.Context) (target, versionID string, recursive bool, timeRef time.Time, withVersions bool, mode minio.RetentionMode, validity uint64, unit minio.ValidityUnit, bypass, bucketMode bool) {
|
||||
|
||||
Reference in New Issue
Block a user