go.actions encodes and decodes dialogflow fulfillment requests and responses sent through Google Actions.
go get github.com:damondouglas/go.actions
import (
"github.com/damondouglas/go.actions/v2/dialogflow"
"encoding/json"
)
func HandleAction(w http.ResponseWriter, r *http.Request) {
var req *dialogflow.Request
if err := json.NewDecoder(r).Decode(&req); err != nil {
// Handle err
}
// Do something with req
}