dev/sg: rework output and add Buildkite log headers
There are no commits yet
Push commits to the source branch or add previously merged commits to review them.
Created by: bobheadxi
Four major changes:
stdout
to std
, so that it reads nicer: std.Out
instead of stdout.Out
output.Output
with std.Output
so that we can build wrappers on top. This wrapper is also used to generate Buildkite log output anchors (https://buildkite.com/docs/pipelines/managing-log-output), which helps us manage CI output.printing.go
into std.Output
, and rename a few to make them more purposeful: orangeLinef
-> WriteAlertf
, and so on. This will help us align sg
output across the tool. Moving to std.Out
also allows sg
packages outside of main
to share formatting primitives.Line
and Linef
that does not provide all arguments: output.Styled
, output.Emoji
, and friends. The pattern of omitting output.Style
or emoji is so common that I think it is worth introducing special aliases for them to avoid constantly having to enter blank arguments.Minor changes:
Sorry for the big PR! I got a bit carried away here
go run ./dev/sg
for a variety of commands still work
Set BUILDKITE=true
and try e.g. go run ./dev/sg lint
, or just check it out in CI:
Push commits to the source branch or add previously merged commits to review them.