A lightweight terminal messaging toolkit for Go CLIs
0

Configure Feed

Select the types of activity you want to include in your feed.

Update module go.followtheprocess.codes/hue to v1 (#107)

* Update module go.followtheprocess.codes/hue to v1

* Fix linter

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tom Fleet <me@followtheprocess.codes>

authored by

renovate[bot]
renovate[bot]
Tom Fleet
and committed by
GitHub
(Sep 27, 2025, 3:41 PM +0100) 40df0f27 f50c3402

+14 -2
+1 -1
.golangci.yml
··· 29 29 - gocyclo # cyclop does this instead 30 30 - godox # "todo" and "fixme" comments are allowed 31 31 - goheader # No need 32 + - goprintffuncname # I do a lot of this in here 32 33 - gosmopolitan # No need 33 34 - grouper # Imports take care of themselves, rest is common sense 34 35 - ireturn # This is just not necessary or practical in a real codebase ··· 44 45 - varnamelen # Lots of false positives of things that are fine 45 46 - wrapcheck # Not every error must be wrapped 46 47 - wsl # Very aggressive, some of this I like but tend to do anyway 47 - - wsl_v5 # Very aggressive, some of this I like but tend to do anyway 48 48 49 49 exclusions: 50 50 presets:
+1 -1
go.mod
··· 2 2 3 3 go 1.25 4 4 5 - require go.followtheprocess.codes/hue v0.7.0 5 + require go.followtheprocess.codes/hue v1.0.0 6 6 7 7 require ( 8 8 golang.org/x/sys v0.36.0 // indirect
+2
go.sum
··· 2 2 go.followtheprocess.codes/hue v0.6.0/go.mod h1:tNCWKaywHqkFo20hYOVwG7CaoRajJeE2AueP5HStY7U= 3 3 go.followtheprocess.codes/hue v0.7.0 h1:6HaZTGc4NYVnqqjYZTTBcVYRKb8MyfPe5yBHJiBfekg= 4 4 go.followtheprocess.codes/hue v0.7.0/go.mod h1:gSn5xK6KJapih+eFgQk3woo1qg3/rx9XSrAanUIuDr8= 5 + go.followtheprocess.codes/hue v1.0.0 h1:0fYXAGR1o+w7Vja+Q+iVtqeEP3/CE6ET/pniyl8e9yo= 6 + go.followtheprocess.codes/hue v1.0.0/go.mod h1:gSn5xK6KJapih+eFgQk3woo1qg3/rx9XSrAanUIuDr8= 5 7 golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= 6 8 golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= 7 9 golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
+10
msg_test.go
··· 76 76 func TestErr(t *testing.T) { 77 77 t.Run("nil", func(t *testing.T) { 78 78 buf := new(bytes.Buffer) 79 + 79 80 var err error 80 81 msg.Ferr(buf, err) 81 82 ··· 102 103 two := fmt.Errorf("failed to process file: %w", one) 103 104 three := fmt.Errorf("could not deposit money: %w", two) 104 105 msg.Ferr(buf, three) 106 + 105 107 wantTemplate := `%[1]sError%[2]s: could not deposit money 106 108 ╰─ %[3]scause%[2]s: failed to process file 107 109 ╰─ %[3]scause%[2]s: could not frobnicate the baz ··· 238 240 239 241 func captureStdout(t *testing.T, printer func()) string { 240 242 t.Helper() 243 + 241 244 old := os.Stdout // Backup of the real one 245 + 242 246 defer func() { 243 247 os.Stdout = old // Set it back even if we error later 244 248 }() ··· 256 260 go func() { 257 261 buf := new(bytes.Buffer) 258 262 io.Copy(buf, r) //nolint: errcheck // It's fine 263 + 259 264 capture <- buf.String() 260 265 }() 261 266 ··· 264 269 265 270 // Close the writer 266 271 w.Close() 272 + 267 273 captured := <-capture 268 274 269 275 return captured ··· 271 277 272 278 func captureStderr(t *testing.T, printer func()) string { 273 279 t.Helper() 280 + 274 281 old := os.Stderr // Backup of the real one 282 + 275 283 defer func() { 276 284 os.Stderr = old // Set it back even if we error later 277 285 }() ··· 289 297 go func() { 290 298 buf := new(bytes.Buffer) 291 299 io.Copy(buf, r) //nolint: errcheck // It's fine 300 + 292 301 capture <- buf.String() 293 302 }() 294 303 ··· 297 306 298 307 // Close the writer 299 308 w.Close() 309 + 300 310 captured := <-capture 301 311 302 312 return captured