Skip to content

Commit

Permalink
docs: Added examples on slog usage
Browse files Browse the repository at this point in the history
  • Loading branch information
alcb1310 committed Oct 8, 2024
1 parent 8b5ecc9 commit 947b08d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion seshcli/seshcli.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package seshcli

import (
"log/slog"

"github.com/urfave/cli/v2"

"github.com/joshmedeski/sesh/configurator"
"github.com/joshmedeski/sesh/connector"
"github.com/joshmedeski/sesh/dir"
Expand All @@ -19,7 +23,6 @@ import (
"github.com/joshmedeski/sesh/tmux"
"github.com/joshmedeski/sesh/tmuxinator"
"github.com/joshmedeski/sesh/zoxide"
"github.com/urfave/cli/v2"
)

func App(version string) cli.App {
Expand All @@ -45,9 +48,12 @@ func App(version string) cli.App {
config, err := configurator.NewConfigurator(os, path, runtime).GetConfig()
// TODO: make sure to ignore the error if the config doesn't exist
if err != nil {
slog.Error("seshcli/seshcli.go: App", "error", err)
panic(err)
}

slog.Debug("seshcli/seshcli.go: App", "version", version, "config", config)

// core dependencies
lister := lister.NewLister(config, home, tmux, zoxide, tmuxinator)
startup := startup.NewStartup(config, lister, tmux)
Expand Down

0 comments on commit 947b08d

Please sign in to comment.