Unexport NewApiMethodNotAllowedError

This commit is contained in:
Cody Soyland 2018-07-05 21:48:11 -05:00
parent b4b0fd2e64
commit a1fc587577
2 changed files with 3 additions and 3 deletions

2
api.go
View file

@ -90,7 +90,7 @@ func (api *API) validate(f apiMethod) error {
if _, ok := validAPIMethods[state][f]; ok {
return nil
}
return NewApiMethodNotAllowedError(errors.Errorf("api method %s not allowed in state %s", f, state))
return newApiMethodNotAllowedError(errors.Errorf("api method %s not allowed in state %s", f, state))
}
// Query parses a PQL query out of the request and executes it.

View file

@ -69,8 +69,8 @@ type apiMethodNotAllowedError struct {
error
}
// NewApiMethodNotAllowedError returns err wrapped in an ApiMethodNotAllowedError.
func NewApiMethodNotAllowedError(err error) apiMethodNotAllowedError {
// newApiMethodNotAllowedError returns err wrapped in an ApiMethodNotAllowedError.
func newApiMethodNotAllowedError(err error) apiMethodNotAllowedError {
return apiMethodNotAllowedError{err}
}