Skip to content

Commit 48a765a

Browse files
Merge pull request #113 from github/gtowey-freno-help
Update freno help message handling
2 parents aebcbcf + 08095b6 commit 48a765a

File tree

2 files changed

+14
-18
lines changed

2 files changed

+14
-18
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ dist/
44
main
55
conf/freno.local.conf.json
66
.vendor/
7+
freno
78
.idea/

cmd/freno/main.go

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func main() {
4343
group.ForceLeadership = *forceLeadership
4444

4545
if *help {
46-
printHelp()
46+
printUsage()
4747
return
4848
}
4949

@@ -83,8 +83,6 @@ func main() {
8383
case *http:
8484
err := httpServe()
8585
log.Errore(err)
86-
case *help:
87-
printHelp()
8886
default:
8987
printUsage()
9088
}
@@ -126,25 +124,22 @@ func httpServe() error {
126124
return gohttp.ListenAndServe(fmt.Sprintf(":%d", port), router)
127125
}
128126

129-
func printHelp() {
130-
panic("not yet implemented")
131-
}
132-
133127
func printUsage() {
134128
fmt.Println(`Usage: freno [OPTIONS]
135-
To run the freno service, execute:
136-
freno --http
129+
To run the freno service, execute:
130+
freno --http
137131
138-
For more help options use: freno -help.
139-
140-
freno is a free and open source software.
141-
Please see https://github.com/github/freno/blob/master/README.md#license for license.
142-
Sources and binaries are found on https://github.com/github/freno/releases.
143-
Sources are also available by cloning https://github.com/github/freno.
132+
freno is a free and open source software.
133+
Please see https://github.com/github/freno/blob/master/README.md#license for license.
134+
Sources and binaries are found on https://github.com/github/freno/releases.
135+
Sources are also available by cloning https://github.com/github/freno.
144136
145137
Issues can be sumbitted on https://github.com/github/freno/issues
146-
Please see https://github.com/github/freno/blob/master/README.md#contributing for contributions
138+
Please see https://github.com/github/freno/blob/master/README.md#contributing for contributions
139+
140+
Authored by GitHub engineering
141+
142+
OPTIONS:`)
147143

148-
Authored by GitHub engineering
149-
`)
144+
flag.PrintDefaults()
150145
}

0 commit comments

Comments
 (0)