Created
November 17, 2021 10:26
-
-
Save luqmansen/57e75567e5c4a60a8ddc922e7e93de90 to your computer and use it in GitHub Desktop.
Debug Golang Struct
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func debugStruct(d interface{}) { | |
s, _ := json.MarshalIndent(d, "", "\t") | |
fmt.Println(string(s)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment