aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2024-08-24 14:48:28 -0400
committerSam Anthony <sam@samanthony.xyz>2024-08-24 14:48:28 -0400
commit050f26f34a64689e16fc9d20c9a9dc3f7e43b1d0 (patch)
tree91e5122d9fc3975fe76d32c98183213ada1aec9e
parentd8743bbc53c8db43151ef89d21264b531bea3d4c (diff)
downloadgui-050f26f34a64689e16fc9d20c9a9dc3f7e43b1d0.zip
rename MakeEventsChan -> makeEventsChan
-rw-r--r--env.go2
-rw-r--r--event.go4
-rw-r--r--mux.go4
3 files changed, 5 insertions, 5 deletions
diff --git a/env.go b/env.go
index cf7f96c..05276b5 100644
--- a/env.go
+++ b/env.go
@@ -15,7 +15,7 @@ import (
//
// An Env guarantees to produce a "resize/<x0>/<y0>/<x1>/<y1>" event as its first event.
//
-// The Events() channel must be unlimited in capacity. Use MakeEventsChan() to create
+// The Events() channel must be unlimited in capacity. Use makeEventsChan() to create
// a channel of events with an unlimited capacity.
//
// The Draw() channel may be synchronous.
diff --git a/event.go b/event.go
index 533317e..3b88c00 100644
--- a/event.go
+++ b/event.go
@@ -23,7 +23,7 @@ func (r Resize) String() string {
return fmt.Sprintf("resize/%d/%d/%d/%d", r.Min.X, r.Min.Y, r.Max.X, r.Max.Y)
}
-// MakeEventsChan implements a channel of events with an unlimited capacity. It does so
+// makeEventsChan implements a channel of events with an unlimited capacity. It does so
// by creating a goroutine that queues incoming events. Sending to this channel never blocks
// and no events get lost.
//
@@ -34,7 +34,7 @@ func (r Resize) String() string {
// An unlimited capacity channel has its dangers in general, but is completely fine for
// the purpose of delivering events. This is because the production of events is fairly
// infrequent and should never out-run their consumption in the long term.
-func MakeEventsChan() (<-chan Event, chan<- Event) {
+func makeEventsChan() (<-chan Event, chan<- Event) {
out, in := make(chan Event), make(chan Event)
go func() {
diff --git a/mux.go b/mux.go
index 3f1d96a..5c6afe9 100644
--- a/mux.go
+++ b/mux.go
@@ -118,7 +118,7 @@ type muxEnv struct {
}
func (mux Mux) MakeEnv() Env {
- eventsOut, eventsIn := MakeEventsChan()
+ eventsOut, eventsIn := makeEventsChan()
drawChan := make(chan func(draw.Image) image.Rectangle)
attached := newAttachHandler()
kill := make(chan bool)
@@ -146,7 +146,7 @@ func (mux Mux) MakeEnv() Env {
defer close(kill)
defer close(drawChan)
defer close(eventsIn)
- // eventsOut closed automatically by MakeEventsChan()
+ // eventsOut closed automatically by makeEventsChan()
defer func() {
mux.removeChild <- env