Skip to content

Commit

Permalink
Merge pull request #8 from blp1526/slash
Browse files Browse the repository at this point in the history
Remove useless //
  • Loading branch information
blp1526 authored Jul 9, 2017
2 parents 01beb8b + 30ce932 commit 42beaa4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ func Request(body interface{}, zoneName string, serverId string) error {
scv := &config.Scv{}
current, _ := user.Current()
dir := filepath.Join(current.HomeDir, "scv.json")
logger.Debug(dir)
config.Load(scv, dir)

if scv.AccessToken == "" || scv.AccessTokenSecret == "" {
Expand Down
4 changes: 3 additions & 1 deletion cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"os/exec"

"github.com/blp1526/scv/api"
"github.com/blp1526/scv/logger"
)

func Run(zoneName string, serverName string) error {
Expand All @@ -14,10 +15,11 @@ func Run(zoneName string, serverName string) error {
}

vncPath := vncPath(*body)
logger.Debug("vncPath is " + vncPath)
err = exec.Command("open", vncPath).Run()
return err
}

func vncPath(body api.Body) string {
return "// vnc://:" + body.Password + "@" + body.Host + ":" + body.Port
return "vnc://:" + body.Password + "@" + body.Host + ":" + body.Port
}
3 changes: 0 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,5 @@ func Load(scv *Scv, filePath string) error {
}

err = json.Unmarshal(bytes, scv)
if err != nil {
return err
}
return err
}

0 comments on commit 42beaa4

Please sign in to comment.