diff --git a/api.go b/api.go index 6ea2c79b5..86a739d5f 100644 --- a/api.go +++ b/api.go @@ -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. diff --git a/pilosa.go b/pilosa.go index a63e64f76..7c313d29b 100644 --- a/pilosa.go +++ b/pilosa.go @@ -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} }