Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Go Httpbin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Container Registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSS
Nix
Go Httpbin
Commits
688c5627
Unverified
Commit
688c5627
authored
2 years ago
by
Will McCutchen
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
cmd: fix help output (#101)
parent
95fdb991
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
httpbin/cmd/cmd.go
+1
-1
1 addition, 1 deletion
httpbin/cmd/cmd.go
httpbin/cmd/cmd_test.go
+1
-1
1 addition, 1 deletion
httpbin/cmd/cmd_test.go
with
2 additions
and
2 deletions
httpbin/cmd/cmd.go
+
1
−
1
View file @
688c5627
...
...
@@ -131,7 +131,7 @@ func (e ConfigError) Error() string {
func
loadConfig
(
args
[]
string
,
getEnv
func
(
string
)
string
,
getHostname
func
()
(
string
,
error
))
(
*
config
,
error
)
{
cfg
:=
&
config
{}
fs
:=
flag
.
NewFlagSet
(
""
,
flag
.
ContinueOnError
)
fs
:=
flag
.
NewFlagSet
(
"
go-httpbin
"
,
flag
.
ContinueOnError
)
fs
.
BoolVar
(
&
cfg
.
rawUseRealHostname
,
"use-real-hostname"
,
false
,
"Expose value of os.Hostname() in the /hostname endpoint instead of dummy value"
)
fs
.
DurationVar
(
&
cfg
.
MaxDuration
,
"max-duration"
,
httpbin
.
DefaultMaxDuration
,
"Maximum duration a response may take"
)
fs
.
Int64Var
(
&
cfg
.
MaxBodySize
,
"max-body-size"
,
httpbin
.
DefaultMaxBodySize
,
"Maximum size of request or response, in bytes"
)
...
...
This diff is collapsed.
Click to expand it.
httpbin/cmd/cmd_test.go
+
1
−
1
View file @
688c5627
...
...
@@ -14,7 +14,7 @@ import (
// To update, run:
// make && ./dist/go-httpbin -h 2>&1 | pbcopy
const
usage
=
`Usage:
const
usage
=
`Usage
of go-httpbin
:
-allowed-redirect-domains string
Comma-separated list of domains the /redirect-to endpoint will allow
-host string
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment