mirror of
https://github.com/minio/minio.git
synced 2025-11-21 10:16:03 -05:00
add some description of xl.meta (#9901)
This commit is contained in:
@@ -1,3 +1,19 @@
|
||||
/*
|
||||
* MinIO Cloud Storage, (C) 2020 MinIO, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
@@ -18,7 +34,18 @@ func main() {
|
||||
app := cli.NewApp()
|
||||
app.Copyright = "MinIO, Inc."
|
||||
app.Usage = "xl.meta to JSON"
|
||||
app.Version = "0.0.1"
|
||||
app.HideVersion = true
|
||||
app.CustomAppHelpTemplate = `NAME:
|
||||
{{.Name}} - {{.Usage}}
|
||||
|
||||
USAGE:
|
||||
{{.Name}} {{if .VisibleFlags}}[FLAGS]{{end}} METAFILES...
|
||||
{{if .VisibleFlags}}
|
||||
GLOBAL FLAGS:
|
||||
{{range .VisibleFlags}}{{.}}
|
||||
{{end}}{{end}}
|
||||
`
|
||||
|
||||
app.HideHelpCommand = true
|
||||
|
||||
app.Flags = []cli.Flag{
|
||||
@@ -29,6 +56,10 @@ func main() {
|
||||
}
|
||||
|
||||
app.Action = func(c *cli.Context) error {
|
||||
if !c.Args().Present() {
|
||||
cli.ShowAppHelp(c)
|
||||
return nil
|
||||
}
|
||||
for _, file := range c.Args() {
|
||||
var r io.Reader
|
||||
switch file {
|
||||
|
||||
Reference in New Issue
Block a user