Skip to content

Commit 2bd6909

Browse files
committed
Fixes vetting issues
Example names were not Go idiomatic along with some Machine method copying locks which vet was complaining about.
1 parent ed55299 commit 2bd6909

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

example_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func ExampleDrivesBuilder() {
111111
}
112112
}
113113

114-
func ExampleDrivesBuilder_DriveOpt() {
114+
func ExampleDrivesBuilder_driveOpt() {
115115
drives := firecracker.NewDrivesBuilder("/path/to/rootfs").
116116
AddDrive("/path/to/drive1.img", true).
117117
AddDrive("/path/to/drive2.img", false, func(drive *models.Drive) {
@@ -153,7 +153,7 @@ func ExampleDrivesBuilder_DriveOpt() {
153153
}
154154
}
155155

156-
func ExampleNetworkInterfaces_RateLimiting() {
156+
func ExampleNetworkInterface_rateLimiting() {
157157
// construct the limitations of the bandwidth for firecracker
158158
bandwidthBuilder := firecracker.TokenBucketBuilder{}.
159159
WithInitialSize(1024 * 1024). // Initial token amount

machine.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,17 +189,17 @@ type VsockDevice struct {
189189

190190
// SocketPath returns the filesystem path to the socket used for VMM
191191
// communication
192-
func (m Machine) socketPath() string {
192+
func (m *Machine) socketPath() string {
193193
return m.cfg.SocketPath
194194
}
195195

196196
// LogFile returns the filesystem path of the VMM log
197-
func (m Machine) LogFile() string {
197+
func (m *Machine) LogFile() string {
198198
return m.cfg.LogFifo
199199
}
200200

201201
// LogLevel returns the VMM log level.
202-
func (m Machine) LogLevel() string {
202+
func (m *Machine) LogLevel() string {
203203
return m.cfg.LogLevel
204204
}
205205

0 commit comments

Comments
 (0)