Skip to content

Commit

Permalink
feat(format): add dd function
Browse files Browse the repository at this point in the history
  • Loading branch information
Matrix-X committed Nov 24, 2021
1 parent 98fb714 commit 6ff2ea1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fmt/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"os"
"reflect"
)

Expand All @@ -24,6 +25,12 @@ func PrettyJson(data interface{}) (string, error) {
return buffer.String(), nil
}


func DD(datas ...interface{}) {
Dump(datas)
os.Exit(0)
}

func Dump(datas ...interface{}) {
for _, data := range datas {
dump(data)
Expand Down

0 comments on commit 6ff2ea1

Please sign in to comment.