diff options
| author | Ke Li <kel@splunk.com> | 2016-12-25 14:37:31 +0800 |
|---|---|---|
| committer | Ke Li <kel@splunk.com> | 2016-12-27 21:46:52 +0800 |
| commit | 514adcf4580effa4820be8d5e6d2c0ea9825ceb2 (patch) | |
| tree | 0e34878e890c05a68803ad44609d5857465ecc24 /api/server/httputils | |
| parent | b81f47a288bcc28d1fe0f6fb4f79636074dbf67c (diff) | |
| download | docker-514adcf4580effa4820be8d5e6d2c0ea9825ceb2.tar.gz | |
Remove redundant format
Signed-off-by: Ke Li <kel@splunk.com>
Add missing changes
Signed-off-by: Ke Li <kel@splunk.com>
User errors.New to create error
Signed-off-by: Ke Li <kel@splunk.com>
Diffstat (limited to 'api/server/httputils')
| -rw-r--r-- | api/server/httputils/form.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/api/server/httputils/form.go b/api/server/httputils/form.go index 280e1c1765..69b5bc3f77 100644 --- a/api/server/httputils/form.go +++ b/api/server/httputils/form.go @@ -1,7 +1,7 @@ package httputils import ( - "fmt" + "errors" "net/http" "path/filepath" "strconv" @@ -61,9 +61,9 @@ func ArchiveFormValues(r *http.Request, vars map[string]string) (ArchiveOptions, switch { case name == "": - return ArchiveOptions{}, fmt.Errorf("bad parameter: 'name' cannot be empty") + return ArchiveOptions{}, errors.New("bad parameter: 'name' cannot be empty") case path == "": - return ArchiveOptions{}, fmt.Errorf("bad parameter: 'path' cannot be empty") + return ArchiveOptions{}, errors.New("bad parameter: 'path' cannot be empty") } return ArchiveOptions{name, path}, nil |
