浏览代码

fix some types on errors and form

Signed-off-by: kaiwentan <kaiwentan@harmonycloud.cn>
kaiwentan 8 年之前
父节点
当前提交
ac9c47e26f
共有 3 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      api/errors/errors.go
  2. 1 1
      api/server/httputils/errors.go
  3. 1 1
      api/server/httputils/form.go

+ 1 - 1
api/errors/errors.go

@@ -16,7 +16,7 @@ func (e apiError) HTTPErrorStatusCode() int {
 
 // NewErrorWithStatusCode allows you to associate
 // a specific HTTP Status Code to an error.
-// The Server will take that code and set
+// The server will take that code and set
 // it as the response status.
 func NewErrorWithStatusCode(err error, code int) error {
 	return apiError{err, code}

+ 1 - 1
api/server/httputils/errors.go

@@ -28,7 +28,7 @@ type inputValidationError interface {
 	IsValidationError() bool
 }
 
-// GetHTTPErrorStatusCode retrieves status code from error message
+// GetHTTPErrorStatusCode retrieves status code from error message.
 func GetHTTPErrorStatusCode(err error) int {
 	if err == nil {
 		logrus.WithFields(logrus.Fields{"error": err}).Error("unexpected HTTP error handling")

+ 1 - 1
api/server/httputils/form.go

@@ -15,7 +15,7 @@ func BoolValue(r *http.Request, k string) bool {
 }
 
 // BoolValueOrDefault returns the default bool passed if the query param is
-// missing, otherwise it's just a proxy to boolValue above
+// missing, otherwise it's just a proxy to boolValue above.
 func BoolValueOrDefault(r *http.Request, k string, d bool) bool {
 	if _, ok := r.Form[k]; !ok {
 		return d