File tree Expand file tree Collapse file tree 3 files changed +47
-20
lines changed Expand file tree Collapse file tree 3 files changed +47
-20
lines changed Original file line number Diff line number Diff line change @@ -184,13 +184,15 @@ func main() {
184184 fmt .Fprintln (eout , err )
185185 os .Exit (1 )
186186 }
187+ defer in .Close ()
187188 }
188189 if outputFName != "" {
189190 out , err = os .Create (outputFName )
190191 if err != nil {
191192 fmt .Fprintln (eout , err )
192193 os .Exit (1 )
193194 }
195+ defer out .Close ()
194196 }
195197
196198 // Process options
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ pubDate: 2022-10-28
88
99codemeta2cff
1010
11- # SYSNOPSIS
11+ # SYNOPSIS
1212
1313codemeta2cff [ OPTIONS] [ CODEMETA_JSON CITATION_CFF]
1414
Original file line number Diff line number Diff line change 1+ ---
2+ title : " {app_name} (1) user manual"
3+ author : " R. S. Doiel"
4+ pubDate : 2023-01-09
5+ ---
16
2- USAGE: yaml2json [ OPTIONS ] [ YAML_FILENAME ] [ JSON_NAME ]
7+ # NAME
38
4- DESCRIPTION
9+ {app_name}
510
6- yaml2json is a tool that converts YAML into JSON output.
11+ # SYNOPSIS
712
8- OPTIONS
13+ {app_name} [ OPTIONS] [ YAML_FILENAME ] [ JSON_NAME ]
914
10- -examples display example(s)
11- -generate-manpage generate man page
12- -generate-markdown generate markdown documentation
13- -h, -help display help
14- -l, -license display license
15- -nl, -newline if true add a trailing newline
16- -o, -output output filename
17- -p, -pretty pretty print output
18- -quiet suppress error messages
19- -v, -version display version
15+ # DESCRIPTION
2016
17+ {app_name} is a tool that converts YAML into JSON output.
2118
22- EXAMPLES
19+ # OPTIONS
20+
21+
22+ -help:
23+ display help
24+
25+ -license
26+ : display license
27+
28+ -version
29+ : display version
30+
31+ -nl, -newline
32+ : if true add a trailing newline
33+
34+ -o, -output
35+ : output filename
36+
37+ -p, -pretty
38+ : pretty print output
39+
40+ -quiet
41+ : suppress error messages
42+
43+
44+ # EXAMPLES
2345
2446These would get the file named "my.yaml" and save it as my.json
2547
26- yaml2json my.yaml > my.json
48+ ~~~
49+ {app_name} my.yaml > my.json
50+
51+ {app_name} my.yaml my.json
2752
28- yaml2json my.yaml my.json
53+ cat my.yaml | {app_name} -i - > my.json
54+ ~~~
2955
30- cat my.yaml | yaml2json -i - > my.json
56+ {app_name} {version}
3157
32- yaml2json 1.2.1
You can’t perform that action at this time.
0 commit comments