Go R1 Day 44
- Generated tests for Gorilla Mux and realized need more context and reading on how to properly test Gorilla Mux to avoid excessively mocking.
- Reviewed two different paradigms for struct methods, using parameters and using global configuration objects.
- go - Unit testing for functions that use gorilla/mux URL parameters - Stack Overflow
- Building and Testing a REST API in Go with Gorilla Mux and PostgreSQL - Semaphore
- Testing gorilla/mux handlers - Blog
Go R1 Day 43
- Modified forked SharedBrain repo to use
yamlparser instead of toml.
- Modified tests handle invalid casting of interface, which was causing a panic.
- Improved tests to align to markdown standard formatting.
- FOSS license scanned on 4 repos to test compliance of licensing for badge.
- Use goyek templates to build out initial go based build …
Go R1 Day 42
- Configured basic test case for GitHub - goyek/goyek: Create build pipelines in Go repo I created.
- GitHub - pterm/pterm used to provide progress on output as it installed linting tooling.
Go R1 Day 41
- Enabled Go code coverage for tests in VSCode
go install github.com/jpoles1/[email protected]to install tooling for generating code coverage badge for readme.
![gopherbadger-tag-do-not-edit]()in the readme, and then this gets replaced with a code coverage percentage badge.
- Generate the required code coverage reports using:
go test -coverprofile cover.outfollowed by
go tool cover -html=cover.out -o coverage.htmlfor a visual report.
Go R1 Day 40
- Learned a bit more modules vs packages, including internal package special behavior.
- Configured Azure DevOps remote module source with package level imports.
- Successfully migrated a utility logger for setup of Zerolog into a seperate remote module for importing.
- Setup 50% test coverage for logger using
- Used Is for test setup. (this would be a cool use of gotest templates test generation)
- Modified sharedbrain forked repo to generate yaml front matter with dashes. …
Go R1 Day 39
- built a better understanding of how to resolve Go modules from private Azure DevOps instances
Using Azure DevOps for Private Go Modules
This took a few hours of work to iron out, so figured maybe I’d save someone time.
⚡ Just keep it simple and use SSH
dev.azure.com even if using older
project.visualstudio.com to keep things simple.
Unlike GitHub, Azure DevOps has some quirks to deal with, specifically in the odd path handling.
My original goal was to set the default handling to be
https support, with the SSH override in git config allowing me to use SSH.
This didn’t work.
- HTTPS requires …
GitPod User Feedback
- Thank you GitPod for integrating with VSCode. 🎉
- Upcoming ssh support, so freaking cool! Are you using Chisel in the backend per the GitHub issues I found discussing workaround? As a Go dev, I’m interested ⚡ I believe Jetbrains + VSCode users will now both be able to leverage the same backend.
- GitHub took over the codespace arena with Visual Studio Codespaces being abandoned. Enterprise customers using Azure Repos can’t benefit from any of this new flexibility 💔. Is it in the roadmap …
Log4 Brains Improves ADR Experience
I’m a fan of architectural decision records. Docs as code sets a practice for a team to track decisions in process and design.
Log4Brains provides markdown template based adr creation, with an option to render a static site for reading.
If you want to start managing your ADRs in a structured way, but benefit from simple markdown as the source files, then this is a great option to consider.
It’s really easy to get started with docker, no
npm install required.
docker run --rm …
Career Advice From a Drunk Dev on Reddit
Drunk Post: Things I’ve learned as a Sr Engineer has trending with some fantastic discussion on Twitter & Reddit.
What makes it so interesting is the raw and unfiltered message, mixed in with some great humor.
The author of that post comes from a Data Engineer side.
I’ve been a Database Developer, Production DBA, Cloud Engineer, and other odd hats.
Some of my perspectives is different from the roles I’ve been …
Highlight Problem Characters in Code
Use Vscode Gremlins to help flag characters that shouldn’t be in your code.
Specifying a Range of Invalid Characters
You can give a range to flag multiple characters with a single rule.
For example, if using macOS and the option key is set to a modifier, it’s easy to accidentally include a Latin-1 Supplemental Character that can be difficult to notice in your code.
To catch the entire range, the Latin-1-Supplement link provided shows a unicode range of:
Configure a rule …
The Dark Side
Saw this on a Twitter thread and had to save it. If you’ve ever debated light vs dark themes, you might find this as funny as I did.
Nearly choked on my dinner.