Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove util.go

  • Loading branch information...
commit 4833af9382a347b04b9e08adc66aa9de844094f5 1 parent 259a27c
@pietern pietern authored
Showing with 1 addition and 9 deletions.
  1. +1 −1  json_codec.go
  2. +0 −8 util.go
View
2  json_codec.go
@@ -14,7 +14,7 @@ func NewJsonCodec() Codec {
func (j *JsonCodec) EncodeRecord(record *Record) ([]byte, error) {
b, err := json.Marshal(record)
if err != nil {
- b = genErrorMsgInJson(err)
+ return json.Marshal(map[string]string{"error": err.Error()})
}
return b, err
View
8 util.go
@@ -1,8 +0,0 @@
-package steno
-
-import "encoding/json"
-
-func genErrorMsgInJson(err error) []byte {
- bytes, _ := json.Marshal(map[string]string{"error": err.Error()})
- return bytes
-}

0 comments on commit 4833af9

Please sign in to comment.
Something went wrong with that request. Please try again.