Skip to content

Commit

Permalink
Merge pull request #274 from ponkio-o/remove-unnecessary-struct
Browse files Browse the repository at this point in the history
fix: remove unnecessary struct
  • Loading branch information
ponkio-o authored Jan 30, 2025
2 parents b07fdcb + 227cdff commit 414bd0b
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ type EC2Instance struct {
NameTag string
}

type SessInfo struct {
SessionID string
StreamUrl string
TokenValue string
}

func ConnectCommand(c *cli.Context) error {
app := c.Context.Value(appCLI).(*App)
id, err := app.selectInstance()
Expand All @@ -58,13 +52,10 @@ func (app App) startSession(id, region string) error {
return err
}

sessi := SessInfo{
SessionID: aws.ToString(result.SessionId),
StreamUrl: aws.ToString(result.StreamUrl),
TokenValue: aws.ToString(result.TokenValue),
sess, err := json.Marshal(result)
if err != nil {
return err
}

sess, _ := json.Marshal(sessi)
cmd := exec.Command("session-manager-plugin", string(sess), region, "StartSession")
signal.Ignore(os.Interrupt)
defer signal.Reset(os.Interrupt)
Expand Down

0 comments on commit 414bd0b

Please sign in to comment.