From 4b4655b14a2bcc44be0372d548d1943e24147a71 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Mon, 27 Jan 2020 21:27:20 -0500 Subject: [PATCH] Note about project being a pre-release --- README.md | 6 ++++-- tea.go | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 72eba1f..b401f2b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # Tea -茶! The fun, functional way to build terminal apps. A Go framework based on -[The Elm Architecture][elm]. +The fun, functional way to build terminal apps. A Go framework based on +[The Elm Architecture][elm]. 茶! + +⚠️ This project is a pre-release! The API is subject to change a little. ## Simple example diff --git a/tea.go b/tea.go index cfeb5f0..08db553 100644 --- a/tea.go +++ b/tea.go @@ -1,6 +1,7 @@ package tea import ( + "context" "errors" "io" "os" @@ -18,7 +19,7 @@ type Cmd func(Model) Msg // Sub is an event subscription. If it returns nil it's considered a no-op, // but there's really no reason to have a nil subscription. -type Sub func(Model) Msg +type Sub func(context.Context, Model) Msg // Subs is a keyed set of subscriptions. The key should be a unique // identifier; two different subscriptions should not have the same key