Skip to content

Commit

Permalink
adds web.Empty
Browse files Browse the repository at this point in the history
  • Loading branch information
jritsema committed Nov 4, 2021
1 parent 8eca0ac commit 383ab09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 John Ritsema
Copyright (c) 2021 John Ritsema

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 5 additions & 0 deletions web/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,8 @@ func DataJSON(status int, v interface{}, headers Headers) *Response {
Headers: headers,
}
}

//Empty returns an empty http response
func Empty(status int) *Response {
return Data(status, []byte(""), nil)
}

0 comments on commit 383ab09

Please sign in to comment.