Skip to content

Instantly share code, notes, and snippets.

View pokstad's full-sized avatar

Paul Okstad pokstad

View GitHub Profile
@pokstad
pokstad / app.yaml
Last active August 29, 2015 14:23
Google App Engine Sandbox Module for Dispatch Demo
# make sure to replace "projectid" below with the project ID configured in the Google Developer Console
application: projectid
version: 1
runtime: go
api_version: go1
module: module2
handlers:
- url: /.*
script: _go_app
@pokstad
pokstad / anything.pb.go
Last active April 10, 2017 04:03
Protobuf and generate Go code for protobuf definition demonstrating any.Any usage
// Code generated by protoc-gen-go.
// source: anything.proto
// DO NOT EDIT!
/*
Package anything is a generated protocol buffer package.
It is generated from these files:
anything.proto
@pokstad
pokstad / anything.proto
Created April 10, 2017 04:04
A protobuf defintion to demonstrate any.Any
syntax = "proto3";
package anything;
import "google/protobuf/any.proto";
message AnythingForYou {
google.protobuf.Any anything = 1;
}
@pokstad
pokstad / anything_test.go
Created April 10, 2017 04:20
A Go test that demonstrates how to marshal and unmarshal a Protobuf any.Any type
package anything_test
//go:generate protoc --go_out=. anything.proto
import (
"reflect"
"testing"
proto "github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes"