15 lines
208 B
Go
15 lines
208 B
Go
package models
|
|
|
|
import (
|
|
"encoding/json"
|
|
"log"
|
|
)
|
|
|
|
func PrettyFormatData(s any) string {
|
|
prettyData, err := json.MarshalIndent(s, "", "\t")
|
|
if err != nil {
|
|
log.Panic(err)
|
|
}
|
|
return string(prettyData)
|
|
}
|