Skip to content

Commit 05c4206

Browse files
committedAug 22, 2018
travis, codecov, and docs
1 parent bbabf70 commit 05c4206

15 files changed

+43
-8
lines changed
 

‎.travis.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
language: go
2+
3+
go:
4+
- "1.10"
5+
6+
before_install:
7+
- go get -t -v ./...
8+
9+
script:
10+
- go test -race -coverprofile=coverage.txt -covermode=atomic
11+
12+
after_success:
13+
- bash <(curl -s https://codecov.io/bash)

‎README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
![Release](https://img.shields.io/github/release/bmatcuk/go-vagrant.svg?branch=master)
2+
[![Build Status](https://travis-ci.org/bmatcuk/go-vagrant.svg?branch=master)](https://travis-ci.org/bmatcuk/go-vagrant)
3+
[![codecov.io](https://img.shields.io/codecov/c/github/bmatcuk/go-vagrant.svg?branch=master)](https://codecov.io/github/bmatcuk/go-vagrant?branch=master)
4+
[![GoDoc](https://godoc.org/github.com/bmatcuk/go-vagrant?status.svg)](https://godoc.org/github.com/bmatcuk/go-vagrant)
5+
16
# go-vagrant
2-
A golang wrapper around Vagrant
7+
A golang wrapper around the Vagrant command-line utility.

‎base_command.go

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import (
88
"sync"
99
)
1010

11+
// Base functionality and fields for all commands constructed from the
12+
// VagrantClient.
1113
type BaseCommand struct {
1214
OutputParser
1315

‎command_destroy.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package main
22

3+
// A DestroyCommand specifies the options and output of vagrant destroy.
34
type DestroyCommand struct {
45
BaseCommand
56
DestroyResponse

‎command_halt.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package main
22

3+
// A HaltCommand specifies the options and output of vagrant halt.
34
type HaltCommand struct {
45
BaseCommand
56
HaltResponse

‎command_port.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
package main
22

3+
// PortCommand specifies the options and output of vagrant port.
34
type PortCommand struct {
45
BaseCommand
56
PortResponse
67
}
78

89
// Run vagrant port. After setting options as appropriate, you must call Run()
9-
// or Start() followed by Wait() to execute. Errors will be recorded in Error.
10+
// or Start() followed by Wait() to execute. Output will be in ForwardedPorts
11+
// with any error in Error.
1012
func (client *VagrantClient) Port() *PortCommand {
1113
return &PortCommand{
1214
BaseCommand: newBaseCommand(client),

‎command_provision.go

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"strings"
55
)
66

7+
// ProvisionCommand specifies the options and output of vagrant provision
78
type ProvisionCommand struct {
89
BaseCommand
910
ProvisionResponse

‎command_reload.go

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"strings"
55
)
66

7+
// ReloadCommand specifies the options and output of vagrant reload
78
type ReloadCommand struct {
89
BaseCommand
910
ReloadResponse

‎command_sshconfig.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package main
22

3+
// SSHConfigCommand specifies options and output from vagrant ssh-config
34
type SSHConfigCommand struct {
45
BaseCommand
56
SSHConfigResponse
@@ -10,8 +11,8 @@ type SSHConfigCommand struct {
1011
}
1112

1213
// Run vagrant ssh-config. After setting options as appropriate, you must call
13-
// Run() or Start() followed by Wait() to execute. Errors will be recorded in
14-
// Error.
14+
// Run() or Start() followed by Wait() to execute. Output will be in Configs
15+
// and any error will be in Error.
1516
func (client *VagrantClient) SSHConfig() *SSHConfigCommand {
1617
return &SSHConfigCommand{
1718
BaseCommand: newBaseCommand(client),

‎command_status.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
package main
22

3+
// StatusCommand specifies options and output from vagrant status
34
type StatusCommand struct {
45
BaseCommand
56
StatusResponse
67
}
78

89
// Run vagrant status. After setting options as appropriate, you must call
9-
// Run() or Start() followed by Wait() to execute. Errors will be recorded in
10-
// Error.
10+
// Run() or Start() followed by Wait() to execute. Output will be in Status
11+
// and any error will be in Error.
1112
func (client *VagrantClient) Status() *StatusCommand {
1213
return &StatusCommand{
1314
BaseCommand: newBaseCommand(client),

‎command_suspend.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package main
22

3+
// SuspendCommand specifies options and output from vagrant suspend
34
type SuspendCommand struct {
45
BaseCommand
56
SuspendResponse

‎command_up.go

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"strings"
55
)
66

7+
// UpCommand specifies options and output from vagrant up.
78
type UpCommand struct {
89
BaseCommand
910
UpResponse

‎command_version.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
package main
22

3+
// VersionCommand specifies options and output from vagrant version
34
type VersionCommand struct {
45
BaseCommand
56
VersionResponse
67
}
78

89
// Run vagrant version. After setting options as appropriate, you must call
9-
// Run() or Start() followed by Wait() to execute. Errors will be recorded in
10-
// Error.
10+
// Run() or Start() followed by Wait() to execute. Output will be in
11+
// InstalledVersion and LatestVersion and any error will be in Error.
1112
func (client *VagrantClient) Version() *VersionCommand {
1213
return &VersionCommand{
1314
BaseCommand: newBaseCommand(client),

‎doc.go

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// go-vagrant is a golang wrapper around the vagrant command-line utility.
2+
package main

‎vagrant_client.go

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import (
66
"path/filepath"
77
)
88

9+
// Library users should construct a new VagrantClient using NewVagrantClient().
10+
// From the client, vagrant commands can be constructed such as: client.Up().
911
type VagrantClient struct {
1012
// Directory where the Vagrantfile can be found.
1113
//

0 commit comments

Comments
 (0)
Please sign in to comment.