Skip to content

Commit

Permalink
Do not convert nil value to string representation
Browse files Browse the repository at this point in the history
  • Loading branch information
smokku committed Dec 9, 2014
1 parent 4c93189 commit 8de7e91
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ func requestHandler(resource interface{}) http.HandlerFunc {
}

switch v := data.(type) {
case nil:
// pass
case string:
content = []byte(v)
case int, int8, int16, int32, int64:
Expand Down

0 comments on commit 8de7e91

Please sign in to comment.