grim/convey

Port from logrus to log/slog
default tip
3 months ago, Elliott Sales de Andrade
c588f9b3f559
Port from logrus to log/slog

This doesn't really take much advantage of structured logging beyond what is already done (`id` and `idColor`), and consequently the log handler does not try to do any handling of anything more than that (i.e., grouping, or arbitrary attributes beyond those defined).

One should maybe have a `Context` available to pass in, but there isn't one, and anyway, the log handler doesn't use it, so I've passed in a `TODO` instead.

Everything else is just normal import/rename changes.

Testing Done:
Ran `go run . run`

Reviewed at https://reviews.imfreedom.org/r/2871/
---
environment:
- GO_IMAGE=docker.io/golang:1.21-bookworm
tasks:
import:
type: convey/import
files:
- .:.
export:
type: convey/export
files:
- convey-${CONVEY_VERSION}-darwin-amd64
- convey-${CONVEY_VERSION}-freebsd-amd64
- convey-${CONVEY_VERSION}-linux-amd64
- convey-${CONVEY_VERSION}-linux-arm64
- convey-${CONVEY_VERSION}-windows-amd64.exe
clean:
type: convey/clean
files:
- convey-*
codespell:
type: podman/run
image: docker.io/alpine:edge
script:
- apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/ py3-codespell
- cd ${CONVEY_WORKSPACE}
- codespell .
go-test:
type: podman/run
image: ${GO_IMAGE}
workdir: ${CONVEY_WORKSPACE}
command: go test ./...
build-darwin-amd64:
type: podman/run
image: ${GO_IMAGE}
workdir: ${CONVEY_WORKSPACE}
environment:
- GOOS=darwin
- GOARCH=amd64
command: go build -o convey-${CONVEY_VERSION}-${GOOS}-${GOARCH}
build-freebsd-amd64:
type: podman/run
image: ${GO_IMAGE}
workdir: ${CONVEY_WORKSPACE}
environment:
- GOOS=freebsd
- GOARCH=amd64
command: go build -o convey-${CONVEY_VERSION}-${GOOS}-${GOARCH}
build-linux-amd64:
type: podman/run
image: ${GO_IMAGE}
workdir: ${CONVEY_WORKSPACE}
environment:
- CGO_ENABLED=0
- GOOS=linux
- GOARCH=amd64
command: go build -o convey-${CONVEY_VERSION}-${GOOS}-${GOARCH}
build-linux-arm64:
type: podman/run
image: ${GO_IMAGE}
workdir: ${CONVEY_WORKSPACE}
environment:
- CGO_ENABLED=0
- GOOS=linux
- GOARCH=arm64
command: go build -o convey-${CONVEY_VERSION}-${GOOS}-${GOARCH}
build-windows-amd64:
type: podman/run
image: ${GO_IMAGE}
workdir: ${CONVEY_WORKSPACE}
environment:
- GOOS=windows
- GOARCH=amd64
command: go build -o convey-${CONVEY_VERSION}-${GOOS}-${GOARCH}.exe
plans:
default:
stages:
- name: import
tasks:
- import
- name: testing
concurrent: true
tasks:
- codespell
- go-test
- name: build
concurrent: true
tasks:
- build-darwin-amd64
- build-freebsd-amd64
- build-linux-amd64
- build-linux-arm64
- build-windows-amd64
- name: export
tasks:
- export
clean:
stages:
- tasks: clean
meta-plans:
everything:
plans:
- clean
- default