-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move map type to json middleware and add E type
- Loading branch information
1 parent
4ed2c66
commit 2d106ee
Showing
3 changed files
with
19 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package json | ||
|
||
// M is shorthand for a map[string]any. It is provided as a convenience for | ||
// defining JSON objects in a more concise manner. | ||
type M map[string]any | ||
|
||
// E is shorthand for Error. If you want to return a JSON wrapped error, you can | ||
// use this type. The JSON response will be {"error": "your error message"}. | ||
// If the status is not set, it will default to 400. | ||
type E string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters