SweetOps Slack Archive
Just wanted to give props to the Cloudposse team lead by Erik Osterman @eosterman.
Slack provides a great community chat experience, but there are quite a few problems about using it for Q&A. 1 Since the free plans for communities hide content over 10,000 messages, a healthy community will go over this quickly.
With all the great conversations, I want to find prior discussions to benefit from topics already covered.
Cloudposse archives the community discussions so they can be searched. …
Go R1 Day 63
- Did some work on Go regex processing with a new linting tool concept I have for “semantic line breaks”.
- I’ve forced myself to apply TDD from the get go, so it’s been slow going initially to abstract my functions to be testable without being run as a CLI tool.
- Started on the run test for simulating the cli call as well.
Go R1 Day 62
- Worked with mocks.
Still using the
is package to test.
was replaced with:
Go is messing with my head with how everything gets simplified to the lowest common interface when possible.
Instead of buffer, I’d want to use
io.Writer for example.
Go R1 Day 61
It was a dark and stormy night. The world was bleak. A command was sent to The Compiler.
The assumptions were flawed. The command was rejected.
You have given me an invalid command with
-argument-that-shall-not-work 5being invalid.
But I’ve provided
--argument-that-shall-not-work, the indomitable wizard said.
Your command is unworthy.
Digging into esoteric tomes of knowledge, the wizard discovered others have had similar issues when calling external processes using the …
Go R1 Day 60
- Finished up the basics of dependency injection and how this helps with testable code.
- Worked through concurrency test using channels and go routines.
This will take a bit more to get comfortable with as there is a variety of concepts here.
My initial attempts finally started working using an anonymous function, but couldn’t finalize due to some issue with launching the parallel executable being called.
Not sure why the
--argnameseemed to be trimming the first dash from the …
Go R1 Day 59
- Built some Mage tasks for setup of local projects.
- Used retool post from Nate Finch with Mage project and found it promising to vendor Go based tooling into a local project and not rely on the global package library.
magetoolsrepo to house some basic general mage tasks I could share with other projects.
Use padding in the
Sprintf call to ensure a date comes back …
Go R1 Day 57
- Did some adhoc work in this repo (the hugo repo that contains this blog) testing out Mage, which is a Go based Make alternative.
- Generated dynamic target directory for hugo posts using stringify for kebab case.
- Unexpected behavior when generating dynamic file path including date.
Go R1 Day 56
- Worked on ci-cd pipelines for Go apps.
- Learned a bit more on building Azure Pipeline templates to use with Go, learning a bit from SignalFx and how they did it.
- Read more on semver versioning, and still can’t find anything as good as GitVersion
Go R1 Day 58
- Avoiding a panic in Go for missing dictionary match is very straight forward.
The error pattern for failed conversions and out of range index matches is the same, with:
ok, err := action.
- TODO: Figure out if ok to reference an error in a test by:
is.Equal(error.Error(),"unable to find value in map"). Linter warns me with:
Method call 'err.Error()' might lead to a nil pointer dereference.
- Started work with dependency injection.
My Goland Log
This is a log of my second journey in using Goland from Jetbrains for Go development.
I’ve got VSCode in a great state. It’s flexible, powerful, and I’ve highly customized it to my workflow.
However, doing Go development, I’d like to better explore Jetbrains Goland and see if the experience proves positive.
I’ll log updates and issues here as I work through it in the hope that it might provide you better information if you are considering Goland as well. …