Useful Git global config and ignore rules
I am working with git every single day, from different machines and accounts. And all these hosts have the same global git configuration. I sync it using tiny bash script.
I am working with git every single day, from different machines and accounts. And all these hosts have the same global git configuration. I sync it using tiny bash script.
We are running Kubernetes on both sandbox and production for some months now. Our production cluster is still small, with few services running on it, but, most of our sandbox environment is running on a Kubernetes cluster on AWS. We created the clusters with Kops (which is great...
The design of Go’s runtime assumes that the programmer is responsible for detecting when to terminate a goroutine and when to terminate the program. Normally, a program can be terminated in a normal way by calling os.Exit or by returning from the main() function. There are...
I’ve had my fair share of dealing with proto files in go (and to some extent JS), so I thought I’d share some stuff I’ve learnt the hard way by working with proto files. Protoc include paths The protoc include paths can be pretty confusing, so I’ll give a...
Putting it all together As we touched upon earlier, we generate a package from the generated JS (meta, right?), which can be served from the server. We’ll create a new file, main.go, in which we can spin up a server, serve the frontend and the gRPC backend. Much of the logi...
Last few months I’ve been using Go to write quite a lot of tools. In this post I intent to show not why I chose Go over others, but how I architect those tools, what libraries I use and what kind of automation I have in place. Libraries I’m sure some folks will preffe...
Implement the client GopherJS can be used in a couple of different ways, and there’s a couple of different bindings to many popular JavaScript frameworks. The GopherJS wiki has some great resources. I tried a couple of different ones and ended up using the VueJS bindings be...
Implement the server I like to start by creating a struct and write a simple definition that’ll immediately fail to compile. package server import ( "github.com/johanbrandhorst/gopherjs-grpc-websocket/protos/server" ) type Server struct{} var _ server.MyServerServer...
Create the protobuf interface We’ll start by creating a folder for the package we want to create. Lets call it server. Next we type up a .proto file to define the interface between the server and the client. We’ll have to include some extra proto annotations in order...