Skip to content

Commit c6b68a8

Browse files
committed
Pretty printing for types.JsonText
1 parent 3a92b1f commit c6b68a8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

types/types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,8 @@ func (j *JsonText) Scan(src interface{}) error {
9999
func (j *JsonText) Unmarshal(v interface{}) error {
100100
return json.Unmarshal([]byte(*j), v)
101101
}
102+
103+
// Pretty printing for JsonText types
104+
func (j JsonText) String() string {
105+
return string(j)
106+
}

0 commit comments

Comments
 (0)