Skip to content

Commit

Permalink
Fix Run and RunWithOptions docstring (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonip authored and aeneasr committed Sep 16, 2019
1 parent 2b0896a commit daca8c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dockertest.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ func (d *Pool) BuildAndRun(name, dockerfilePath string, env []string) (*Resource
// RunWithOptions starts a docker container.
// Optional modifier functions can be passed in order to change the hostconfig values not covered in RunOptions
//
// pool.Run(&RunOptions{Repository: "mongo", Cmd: []string{"mongod", "--smallfiles"}})
// pool.Run(&RunOptions{Repository: "mongo", Cmd: []string{"mongod", "--smallfiles"}}, func(hostConfig *dc.HostConfig) {
// pool.RunWithOptions(&RunOptions{Repository: "mongo", Cmd: []string{"mongod", "--smallfiles"}})
// pool.RunWithOptions(&RunOptions{Repository: "mongo", Cmd: []string{"mongod", "--smallfiles"}}, func(hostConfig *dc.HostConfig) {
// hostConfig.ShmSize = shmemsize
// })
func (d *Pool) RunWithOptions(opts *RunOptions, hcOpts ...func(*dc.HostConfig)) (*Resource, error) {
Expand Down Expand Up @@ -334,7 +334,7 @@ func (d *Pool) RunWithOptions(opts *RunOptions, hcOpts ...func(*dc.HostConfig))

// Run starts a docker container.
//
// pool.Run("mysql", "5.3", []string{"FOO=BAR", "BAR=BAZ"})
// pool.Run("mysql", "5.3", []string{"FOO=BAR", "BAR=BAZ"})
func (d *Pool) Run(repository, tag string, env []string) (*Resource, error) {
return d.RunWithOptions(&RunOptions{Repository: repository, Tag: tag, Env: env})
}
Expand Down

0 comments on commit daca8c6

Please sign in to comment.