add some description of xl.meta (#9901)

This commit is contained in:
Harshavardhana
2020-06-22 17:27:54 -07:00
committed by GitHub
parent 5b1e6c7dbc
commit 21058c34d0
4 changed files with 58 additions and 48 deletions

View File

@@ -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 {