From 94171d08f7800978de8ffc087162aa0e77e97530 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Sat, 16 Nov 2024 16:37:29 +0200 Subject: feat: add client config file --- internal/client/client.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'internal/client/client.go') diff --git a/internal/client/client.go b/internal/client/client.go index a60c1e8..df7573f 100644 --- a/internal/client/client.go +++ b/internal/client/client.go @@ -6,6 +6,7 @@ import ( tea "github.com/charmbracelet/bubbletea" + "github.com/kyren223/eko/internal/client/config" "github.com/kyren223/eko/internal/client/ui" "github.com/kyren223/eko/internal/client/ui/auth" "github.com/kyren223/eko/pkg/assert" @@ -22,6 +23,12 @@ func (c BubbleTeaCloser) Close() error { func Run() { log.Println("client started") + + err := config.Load() + if err != nil { + log.Fatalf("Config file at '%v' was unable to load successfully\n%v\n", config.ConfigFile, err) + } + program := tea.NewProgram(initialModel(), tea.WithAltScreen()) assert.AddFlush(BubbleTeaCloser{program}) -- cgit v1.3.1