diff --git a/README.md b/README.md index 54f5db0..f0c8337 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Info -json to yaml tool。 +json to yaml tool. # Install ```shell @@ -11,18 +11,16 @@ make install j2y (json to yaml) is a tool for converting JSON data (from files or direct input) to YAML format. Examples: -[ - 1. Convert from file: - j2y -f input.json -o output.yaml - 2. Convert from command line JSON data: - j2y -i '{"key": "value"}' -o output.yaml - 3. Convert from standard input: - echo '{"foo":1}' | j2y - 4. Specify input file only, output to stdout: - j2y -f input.json - 5. Specify JSON data only, output to stdout: - j2y -i '{"key": "value"}' -] +1.Convert from file: + j2y -f input.json -o output.yaml +2.Convert from command line JSON data: + j2y -i '{"key": "value"}' -o output.yaml +3.Convert from standard input: + echo '{"foo":1}' | j2y +4.Specify input file only, output to stdout: + j2y -f input.json +5.Specify JSON data only, output to stdout: + j2y -i '{"key": "value"}' Usage: Usage: j2y [-f inputFile | -i jsonData] [output] [flags] diff --git a/pkg/help/help.go b/pkg/help/help.go index 0bc3475..6ef68fe 100644 --- a/pkg/help/help.go +++ b/pkg/help/help.go @@ -55,7 +55,7 @@ func generateLongDesc(lang string) string { num := 1 for _, example := range HelpData[lang].Examples { - examples += fmt.Sprintf("%d. %s \n\t %s \n",num, example.Description, example.Command) + examples += fmt.Sprintf("%d.%s \n %s\n",num, example.Description, example.Command) num++ } return fmt.Sprintf("%s\n\nExamples:\n%s", HelpData[lang].ShortDesc,examples)