Skip to content

Commit 43e7a08

Browse files
Add default values in 'get'
1 parent c512678 commit 43e7a08

File tree

5 files changed

+15
-54
lines changed

5 files changed

+15
-54
lines changed

cmd/admin-config-get.go

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,15 @@ FLAGS:
4343
EXAMPLES:
4444
1. Get the current region setting on MinIO server.
4545
{{.Prompt}} {{.HelpName}} play/ region
46-
# US east region setting
47-
name="us-east-1" state="on"
46+
region name=us-east-1
4847
49-
2. Get the current notification settings for MQTT target on MinIO server
50-
{{.Prompt}} {{.HelpName}} myminio/ notify_mqtt
51-
# Notification settings for MQTT broker
52-
notify_mqtt broker="" password="" queue_dir="" queue_limit="0" reconnect_interval="0s" state="off" keep_alive_interval="0s" qos="0" topic="" username=""
48+
2. Get the current notification settings for Webhook target on MinIO server
49+
{{.Prompt}} {{.HelpName}} myminio/ notify_webhook
50+
notify_webhook endpoint="http://localhost:8080" auth_token= queue_limit=10000 queue_dir="/home/events"
5351
5452
3. Get the current compression settings on MinIO server
5553
{{.Prompt}} {{.HelpName}} myminio/ compression
56-
# Compression settings for csv and text files only
57-
compression extensions=".txt,.csv" mime_types="text/*" state="on"
54+
compression extensions=".txt,.csv" mime_types="text/*"
5855
`,
5956
}
6057

cmd/admin-config-help.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,14 @@ const HelpTmpl = `{{if ne .SubSys ""}}{{colorBlueBold "KEY:"}}
3333
3434
{{colorBlueBold "ARGS:"}}{{range .KeysHelp}}
3535
{{if .Optional}}{{colorYellowBold .Key}}{{else}}{{colorRedBold .Key}}*{{end}}{{"\t"}}({{.Type}}){{"\t"}}{{.Description}}{{end}}{{else}}{{colorBlueBold "KEYS:"}}{{range .KeysHelp}}
36-
{{colorRedBold .Key}}*{{"\t"}}{{.Description}}{{end}}{{end}}`
36+
{{colorGreenBold .Key}}{{"\t"}}{{.Description}}{{end}}{{end}}`
3737

3838
var funcMap = template.FuncMap{
3939
"colorBlueBold": color.New(color.FgBlue, color.Bold).SprintfFunc(),
4040
"colorYellowBold": color.New(color.FgYellow, color.Bold).SprintfFunc(),
4141
"colorCyanBold": color.New(color.FgCyan, color.Bold).SprintFunc(),
4242
"colorRedBold": color.New(color.FgRed, color.Bold).SprintfFunc(),
43+
"colorGreenBold": color.New(color.FgGreen, color.Bold).SprintfFunc(),
4344
}
4445

4546
// HelpTemplate - captures config help template

cmd/admin-config-set.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ FLAGS:
4444
{{range .VisibleFlags}}{{.}}
4545
{{end}}
4646
EXAMPLES:
47-
1. Enable WORM mode on MinIO server.
48-
{{.Prompt}} {{.HelpName}} myminio/ worm state="on"
47+
1. Enable webhook notification target for MinIO server.
48+
{{.Prompt}} {{.HelpName}} myminio/ notify_webhook endpoint="http://localhost:8080/minio/events"
4949
5050
2. Change region name for the MinIO server to 'us-west-1'.
51-
{{.Prompt}} {{.HelpName}} myminio/ region name="us-west-1" state="on"
51+
{{.Prompt}} {{.HelpName}} myminio/ region name=us-west-1
5252
`,
5353
}
5454

go.mod

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,19 @@ module github.com/minio/mc
33
go 1.13
44

55
require (
6-
contrib.go.opencensus.io/exporter/ocagent v0.6.0 // indirect
7-
github.com/DataDog/zstd v1.4.4 // indirect
86
github.com/cheggaaa/pb v1.0.28
97
github.com/dgrijalva/jwt-go v3.2.0+incompatible
108
github.com/dustin/go-humanize v1.0.0
119
github.com/fatih/color v1.7.0
1210
github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc // indirect
1311
github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 // indirect
14-
github.com/hashicorp/go-retryablehttp v0.6.3 // indirect
12+
github.com/grpc-ecosystem/grpc-gateway v1.9.4 // indirect
1513
github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf
1614
github.com/mattn/go-colorable v0.1.1
1715
github.com/mattn/go-isatty v0.0.7
1816
github.com/mattn/go-runewidth v0.0.5 // indirect
1917
github.com/minio/cli v1.22.0
20-
github.com/minio/minio v0.0.0-20191119214813-7cdb67680e72
18+
github.com/minio/minio v0.0.0-20191121003501-a9b87c0a16cd
2119
github.com/minio/minio-go/v6 v6.0.41
2220
github.com/minio/sha256-simd v0.1.1
2321
github.com/mitchellh/go-homedir v1.1.0
@@ -29,6 +27,7 @@ require (
2927
go.uber.org/zap v1.11.0 // indirect
3028
golang.org/x/net v0.0.0-20190923162816-aa69164e4478
3129
golang.org/x/text v0.3.2
30+
google.golang.org/grpc v1.22.0 // indirect
3231
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127
3332
gopkg.in/h2non/filetype.v1 v1.0.5
3433
gopkg.in/yaml.v2 v2.2.2

0 commit comments

Comments
 (0)