Skip to content

Commit

Permalink
chore: code cleanup from stream
Browse files Browse the repository at this point in the history
Removing unecessary log and commented out code (from stream)
  • Loading branch information
joshmedeski committed Aug 23, 2024
1 parent ab4243f commit 475b396
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions seshcli/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,6 @@ import (
cli "github.com/urfave/cli/v2"
)

// func tmuxCmd(args []string) (string, error) {
// tmux, err := exec.LookPath("tmux")
// if err != nil {
// return "", err
// }
// var stdout, stderr bytes.Buffer
// cmd := exec.Command(tmux, args...)
// cmd.Stdin = os.Stdin
// cmd.Stdout = &stdout
// cmd.Stderr = os.Stderr
// cmd.Stderr = &stderr
// if err := cmd.Start(); err != nil {
// return "", err
// }
// if err := cmd.Wait(); err != nil {
// errString := strings.TrimSpace(stderr.String())
// if strings.HasPrefix(errString, "no server running on") {
// return "", nil
// }
// return "", err
// }
// return stdout.String(), nil
// }
//
// func attachSession(session string) error {
// if _, err := tmuxCmd([]string{"attach", "-t", session}); err != nil {
// return err
// }
// return nil
// }
func Connect(c connector.Connector, i icon.Icon) *cli.Command {
return &cli.Command{
Name: "connect",
Expand Down Expand Up @@ -69,7 +39,6 @@ func Connect(c connector.Connector, i icon.Icon) *cli.Command {
}
opts := model.ConnectOpts{Switch: cCtx.Bool("switch"), Command: cCtx.String("command")}
trimmedName := i.RemoveIcon(name)
fmt.Println(trimmedName)
if connection, err := c.Connect(trimmedName, opts); err != nil {
// TODO: print to logs?
return err
Expand All @@ -78,9 +47,6 @@ func Connect(c connector.Connector, i icon.Icon) *cli.Command {
fmt.Println(connection)
return nil
}

// attachSession("sesh/v2")
// return nil
},
}
}

0 comments on commit 475b396

Please sign in to comment.