Skip to content

Commit

Permalink
Merge pull request #90 from BlackHole1/improve-comments
Browse files Browse the repository at this point in the history
refactor: improve function comments
  • Loading branch information
openshift-merge-bot[bot] authored Jan 25, 2024
2 parents 979f84f + 6e6a517 commit 1bad6ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions pkg/config/virtio.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ type NVMExpressController struct {
StorageConfig
}

// virtioRng configures a random number generator (RNG) device.
// VirtioRng configures a random number generator (RNG) device.
type VirtioRng struct {
}

Expand Down Expand Up @@ -356,7 +356,7 @@ func VirtioNetNew(macAddress string) (*VirtioNet, error) {
}, nil
}

// Set the socket to use for the network communication
// SetSocket Set the socket to use for the network communication
//
// This maps the virtual machine network interface to a connected datagram
// socket. This means all network traffic on this interface will go through
Expand Down Expand Up @@ -613,7 +613,7 @@ func (dev *VirtioFs) FromOptions(options []option) error {
return nil
}

// RosettaShare creates a new rosetta share for running x86_64 binaries on M1 machines.
// RosettaShareNew RosettaShare creates a new rosetta share for running x86_64 binaries on M1 machines.
// It will share a directory containing the linux rosetta binaries with the
// virtual machine. This directory can be mounted in the VM using `mount -t
// virtiofs mountTag /some/dir`
Expand Down
6 changes: 3 additions & 3 deletions pkg/rest/vf/vm_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func NewVzVirtualMachine(vm *vz.VirtualMachine, config *vz.VirtualMachineConfigu
return &VzVirtualMachine{config: config, VzVM: vm}
}

// inspect returns information about the virtual machine like hw resources
// Inspect returns information about the virtual machine like hw resources
// and devices
func (vm *VzVirtualMachine) Inspect(c *gin.Context) {
ii := define.InspectResponse{
Expand All @@ -30,7 +30,7 @@ func (vm *VzVirtualMachine) Inspect(c *gin.Context) {
c.JSON(http.StatusOK, ii)
}

// getVMState retrieves the current vm state
// GetVMState retrieves the current vm state
func (vm *VzVirtualMachine) GetVMState(c *gin.Context) {
current := vm.GetState()
c.JSON(http.StatusOK, gin.H{
Expand All @@ -43,7 +43,7 @@ func (vm *VzVirtualMachine) GetVMState(c *gin.Context) {
})
}

// setVMState requests a state change on a virtual machine. At this time only
// SetVMState requests a state change on a virtual machine. At this time only
// the following states are valid:
// Pause - pause a running machine
// Resume - resume a paused machine
Expand Down

0 comments on commit 1bad6ae

Please sign in to comment.