Skip to content

Commit d4a9167

Browse files
committed
format
1 parent 9d85948 commit d4a9167

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

phantomjs.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ type PhantomJsSwitches map[string]interface{}
1919
type PhantomJsDriver struct {
2020
WebDriverCore
2121
//The port that PhantomJsDriver listens on. Default: 9515
22-
Port int
22+
Port int
2323
//The URL path prefix to use for all incoming WebDriver REST requests. Default: ""
24-
BaseUrl string
24+
BaseUrl string
2525
//The number of threads to use for handling HTTP requests. Default: 4
26-
Threads int
26+
Threads int
2727
//The path to use for the PhantomJsDriver server log. Default: ./phantomJsdriver.log
28-
LogPath string
28+
LogPath string
2929
// Log file to dump phantomJsdriver stdout/stderr. If "" send to terminal. Default: ""
30-
LogFile string
30+
LogFile string
3131
// Start method fails if PhantomJsdriver doesn't start in less than StartTimeout. Default 20s.
3232
StartTimeout time.Duration
3333

34-
path string
35-
cmd *exec.Cmd
36-
logFile *os.File
34+
path string
35+
cmd *exec.Cmd
36+
logFile *os.File
3737
}
3838

3939
//create a new service using phantomJsdriver.
@@ -59,7 +59,7 @@ func (d *PhantomJsDriver) Start() error {
5959

6060
if d.LogPath != "" {
6161
//check if log-path is writable
62-
file, err := os.OpenFile(d.LogPath, os.O_WRONLY | os.O_CREATE, 0664)
62+
file, err := os.OpenFile(d.LogPath, os.O_WRONLY|os.O_CREATE, 0664)
6363
if err != nil {
6464
return errors.New(csferr + "unable to write in log path: " + err.Error())
6565
}
@@ -68,8 +68,8 @@ func (d *PhantomJsDriver) Start() error {
6868

6969
d.url = fmt.Sprintf("http://127.0.0.1:%d%s", d.Port, d.BaseUrl)
7070
var switches []string
71-
switches = append(switches, "--webdriver=" + strconv.Itoa(d.Port))
72-
switches = append(switches, "--webdriver-logfile=" + d.LogPath)
71+
switches = append(switches, "--webdriver="+strconv.Itoa(d.Port))
72+
switches = append(switches, "--webdriver-logfile="+d.LogPath)
7373
switches = append(switches, "--webdriver-loglevel=DEBUG")
7474

7575
d.cmd = exec.Command(d.path, switches...)

webdriver.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"encoding/json"
1111
"errors"
1212
"io/ioutil"
13-
1413
// "fmt"
1514
// "net/http"
1615
)

0 commit comments

Comments
 (0)