Skip to content

Commit

Permalink
REPLY-X_Release-v0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Leon Silcott committed Aug 31, 2021
1 parent b9a5946 commit f5cc5b2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ replier := reply.NewReplier(baseManifest)

You can use `reply` for both successful and error based responses.

> `NOTE` - When sending an error response, it is essential to make sure you populate the `replier`'s error manifest with the correct errors. Otherwise, a `500 - Internal Server Error` response will be sent back to the client by default if it cannot match the passed error with on in the manifest.
> `NOTE` - When sending an error response, it is essential to make sure you populate the `replier`'s error manifest with the correct errors. Otherwise, a `500 - Internal Server Error` response will be sent back to the client by default if it cannot match the passed error in the manifest.
#### Making use of error manifest

Expand Down
8 changes: 4 additions & 4 deletions model.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ package reply

import "net/http"

// ErrorManifestItem holds the message and status code for a error response
// ErrorManifestItem holds the message and status code for an error response
type ErrorManifestItem struct {

// Message holds the text returned in the response's status.message path
// Message holds the text returned in the response's `status.message` path
//
// NOTE:
//
// - The most effective messages are short, sweet and easy to consume
//
// - This message will be seeing by the consuming client, be mindful of
// how much information you divulge
// - This message will be seen by the consuming client, be mindful of
// the amount of information you divulge
Message string

// StatusCode holds the HTTP status code that best relates to the response.
Expand Down
6 changes: 6 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Reply Release Notes

## [v0.1.1](/~https://github.com/ooaklee/reply/releases/tag/v0.1.1)
2021-08-31

* Added licensing information
* Fixed typos

## [v0.1.0](/~https://github.com/ooaklee/reply/releases/tag/v0.1.0)
2021-08-28

Expand Down
6 changes: 3 additions & 3 deletions replier.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const (
defaultStatusCode = http.StatusOK
)

// Option used to build ontop of default features
// Option used to build on top of default features
type Option func(*Replier)

// WithTransferObject overwrites the transfer object used for response
Expand Down Expand Up @@ -193,8 +193,8 @@ func (r *Replier) setDefaultContentType() {
}
}

// setHeaders handles setting headers on writer. Existing headers hould not
// be affeted unless they share the header key
// setHeaders handles setting headers on the writer. Existing headers should not
// be affected unless they share the header key
func (r *Replier) setHeaders(h map[string]string) {

r.setDefaultContentType()
Expand Down

0 comments on commit f5cc5b2

Please sign in to comment.