summaryrefslogtreecommitdiff
path: root/internal/client/tui/submit.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-08-03 14:11:18 +0300
committerPaul Buetow <paul@buetow.org>2024-08-03 14:11:18 +0300
commit911bac5345502d099e93aa72a79b91e9ba14f01f (patch)
tree0edf4a7de7cb9d6901c690342447d7483646bd4a /internal/client/tui/submit.go
parent5664c4ad14fca54a42356541847e6ae3f9613a87 (diff)
adding Cmd to all functions returning a tea.Cmd
Diffstat (limited to 'internal/client/tui/submit.go')
-rw-r--r--internal/client/tui/submit.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/client/tui/submit.go b/internal/client/tui/submit.go
index 3ab4ab5..d0b4c78 100644
--- a/internal/client/tui/submit.go
+++ b/internal/client/tui/submit.go
@@ -14,22 +14,22 @@ import (
tea "github.com/charmbracelet/bubbletea"
)
-func submitAction(ctx context.Context, conf config.ClientConfig) tea.Cmd {
+func submitActionCmd(ctx context.Context, conf config.ClientConfig) tea.Cmd {
composeFile := fmt.Sprintf("%s/%s", conf.DataDir, conf.ComposeFile)
log.Println("Submitting", composeFile)
- return submitEntry(ctx, conf, composeFile, func() error {
+ return submitEntryCmd(ctx, conf, composeFile, func() error {
// This is the cb to call when the entry was submitted succesfully
return nil
})
}
-func submitEntry(ctx context.Context, conf client.ClientConfig, composeFile string, cb func() error) tea.Cmd {
- return finished(cb, submitEntryNoCmd(ctx, conf, composeFile))
+func submitEntryCmd(ctx context.Context, conf client.ClientConfig, composeFile string, cb func() error) tea.Cmd {
+ return finished(cb, submitEntry(ctx, conf, composeFile))
}
// TODO: Rename all functions returning a Cmd so that they have a Cmd suffix
-func submitEntryNoCmd(ctx context.Context, conf client.ClientConfig, composeFile string) error {
+func submitEntry(ctx context.Context, conf client.ClientConfig, composeFile string) error {
servers, err := conf.Servers()
if err != nil {
return err