Skip to content

Commit

Permalink
remove unused methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantani committed Jul 16, 2024
1 parent 9fb0e2a commit b0d1027
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions spaceship/pkg/ssh/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ import (
)

const (
goAppName = "go"
igniteAppName = "ignite"
workdir = "spaceship"
workdir = "spaceship"
)

type SSH struct {
Expand Down Expand Up @@ -152,14 +150,6 @@ func (s *SSH) Home() string {
return filepath.Join(s.Workspace(), "home")
}

func (s *SSH) Ignite() string {
return filepath.Join(s.Bin(), igniteAppName)
}

func (s *SSH) Go() string {
return filepath.Join(s.Bin(), goAppName)
}

func (s *SSH) validate() error {
switch {
case s.username == "":
Expand Down Expand Up @@ -306,15 +296,3 @@ func (s *SSH) UploadHome(ctx context.Context, srcPath string) (string, error) {
path := s.Home()
return path, s.Upload(ctx, srcPath, path)
}

func (s *SSH) RunIgniteCommand(ctx context.Context, args ...string) (string, error) {
cmd, err := s.client.CommandContext(ctx, s.Ignite(), args...)
if err != nil {
return "", err
}
out, err := cmd.CombinedOutput()
if err != nil {
return "", err
}
return string(out), nil
}

0 comments on commit b0d1027

Please sign in to comment.