From 311c100d8973b7c5545725596f2ddf95bbca9e9f Mon Sep 17 00:00:00 2001
From: Rob Watson <rob@netflux.io>
Date: Mon, 12 May 2025 19:42:50 +0200
Subject: [PATCH] fixup! wip: refactor: API

---
 .goreleaser.yaml             | 3 +--
 internal/client/clientapp.go | 3 +++
 internal/event/bus.go        | 1 +
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/.goreleaser.yaml b/.goreleaser.yaml
index 055a56b..25294e9 100644
--- a/.goreleaser.yaml
+++ b/.goreleaser.yaml
@@ -6,8 +6,7 @@ before:
     - go generate ./...
 
 builds:
-  - main: ./cmd/server
-    env:
+  - env:
       # - CGO_ENABLED=0
     goos:
       - linux
diff --git a/internal/client/clientapp.go b/internal/client/clientapp.go
index 7cfa00b..796735c 100644
--- a/internal/client/clientapp.go
+++ b/internal/client/clientapp.go
@@ -44,6 +44,9 @@ func New(params NewParams) *App {
 }
 
 // Run starts the application, and blocks until it is closed.
+//
+// It returns nil if the application was closed by the user, or an error if it
+// closed for any other reason.
 func (a *App) Run(ctx context.Context) error {
 	g, ctx := errgroup.WithContext(ctx)
 
diff --git a/internal/event/bus.go b/internal/event/bus.go
index 3dc64de..a585acd 100644
--- a/internal/event/bus.go
+++ b/internal/event/bus.go
@@ -32,6 +32,7 @@ func (b *Bus) Register() <-chan Event {
 	return ch
 }
 
+// Deregister deregisters a consumer for all events.
 func (b *Bus) Deregister(ch <-chan Event) {
 	b.mu.Lock()
 	defer b.mu.Unlock()