golang

Building Golang CLI Tools Update

In my previous post I discussed how to use a Makefile to set version and build information at compile time. Although this approach may work fine for you, it has three drawbacks I want to discuss. 1. Simplicity Andrew responded on the golang-nuts mailing list with the following comment: To me it seems like you took something simple and cross platform “go generate” + “go install/build” and turned it into something more complicated and less portable.

A makefile for Golang CLI tools

Note: I’ve received feedback on this post and written an update, which you can read here It’s no secret I love the power and simplicity of Go. To further train my skills I wrote a simple app that will roll dice from the command line, because you know, that’s very useful. There are two goals for me in this project right now: make it trivial to use compile time variables and have a Makefile for easy compilation, installation and clean up.

Synchronize goroutines in your tests

I have been working on an emulator for the MOS 6502 Microprocessor, written in Go. As part of this package I have also implemented a minimal 6551 Asynchronous Communication Interface Adapter. The 6551 provides serial IO and is easy to use in combination with the 6502. When the microprocessor writes a byte to the 6551 it is stored in the tx (transmit) register where it’s available for other hardware components to read.