Created
January 22, 2020 21:02
-
-
Save affix/2f4d68eb7f307cbe1641791a393e464d to your computer and use it in GitHub Desktop.
XML to JSON in Go Marshal to JSON
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 Handle(req []byte) string { | |
json, _ := json.Marshal(data.Channel.Posts) // Encode our Struct as JSON | |
return fmt.Sprintf("%s", string(json)) // Return a String to the OpenFaaS Gateway | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment