Testing and mocking stdin in Golang
I’ve been playing around with cobra recently, as it’s an awesome library for CLI applications. I always like CLI apps for learning a language, so I’ve been tinkering with a CLI app to interact with Terraform Enterprise’s API, which will force me to talking to external APIs, interpret the result and displaying it to the user.
Testing, testing, 123
I want can show my application is tested and reliable. That’s meant I’ve been learning how to test golang. I’m used to Ruby, which has some awesome tools (Mocha, Rspec, Stubbing, Webmock etc). It’s possible to recreate that sort of experience in Golang, with tools like ginko, goconvey or golblin, but since we want to do things “The Golang way” I decided to try and stick to the most vanilla testing possible.