Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bmatcuk committed Sep 12, 2021
1 parent 85924ac commit 5e5e2f4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,22 @@ func main() {

### BoxAdd
Adds a box to your local vagrant box collection. Takes a location which is the
name, url, or path of the box
name, url, or path of the box.

```go
func (*VagrantClient) BoxAdd(location string) *BoxAddCommand
```

Options:
* **Clean** (default: `false`) - Clean any temporary download files. This will
prevent resuming a previously started download.
* **Force** (default: `false`) - Overwrite an existing box if it exists.
* **Name** (default: `""`) - Name of the box. Only has to be set if the box is
provided as a path or url without metadata.
* **Checksum** (default: `""`) - Checksum for the box.
* **CheckSumType** - Type of the supplied Checksum. Allowed values are
vagrant.MD5, vagrant.SHA1, vagrant.SHA256.

Response:
* **Error** - Set if an error occurred.

Expand Down
17 changes: 10 additions & 7 deletions command_box_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ type BoxAddCommand struct {
BaseCommand
ErrorResponse

// Clean any temporary download files. This will prevent resuming a previously started download.
// Clean any temporary download files. This will prevent resuming a
// previously started download.
Clean bool

// Overwrite an existing box if it exists
Expand All @@ -24,20 +25,22 @@ type BoxAddCommand struct {
// Name, url, or path of the box.
Location string

// Name of the box. Only has to be set if the box is provided as a path or url without metadata.
// Name of the box. Only has to be set if the box is provided as a path or
// url without metadata.
Name string

// Checksum for the box
Checksum string

// Type of the supplied Checksum. Allowed values are vagrant.MD5, vagrant.SHA1, vagrant.SHA256
// Type of the supplied Checksum. Allowed values are vagrant.MD5,
// vagrant.SHA1, vagrant.SHA256
CheckSumType CheckSumType
}

// BoxAdd adds a vagrant box to your local boxes.
// Its parameter location is the name, url, or path of the box. After setting
// options as appropriate, you must call Run() or Start() followed by Wait()
// to execute. Errors will be recorded in Error.
// BoxAdd adds a vagrant box to your local boxes. Its parameter location is
// the name, url, or path of the box. After setting options as appropriate, you
// must call Run() or Start() followed by Wait() to execute. Errors will be
// recorded in Error.
func (client *VagrantClient) BoxAdd(location string) *BoxAddCommand {
return &BoxAddCommand{
Location: location,
Expand Down

0 comments on commit 5e5e2f4

Please sign in to comment.