Fix some typos and run gofmt on all .go files

This commit is contained in:
Matthew Penner
2020-09-05 13:08:40 -06:00
parent b9f6e17a7d
commit 7ba32aca84
42 changed files with 89 additions and 84 deletions

View File

@@ -95,4 +95,4 @@ func getDownloadFile(c *gin.Context) {
c.Header("Content-Type", "application/octet-stream")
bufio.NewReader(f).WriteTo(c.Writer)
}
}

View File

@@ -84,7 +84,7 @@ func postServerPower(c *gin.Context) {
return
}
// Pass the actual heavy processing off to a seperate thread to handle so that
// Pass the actual heavy processing off to a separate thread to handle so that
// we can immediately return a response from the server. Some of these actions
// can take quite some time, especially stopping or restarting.
go func(s *server.Server) {
@@ -176,7 +176,7 @@ func postServerReinstall(c *gin.Context) {
c.Status(http.StatusAccepted)
}
// Deletes a server from the wings daemon and deassociates its objects.
// Deletes a server from the wings daemon and dissociate it's objects.
func deleteServer(c *gin.Context) {
s := GetServer(c.Param("server"))

View File

@@ -71,7 +71,7 @@ func postCreateServer(c *gin.Context) {
func postUpdateConfiguration(c *gin.Context) {
// A backup of the configuration for error purposes.
ccopy := *config.Get()
// A copy of the configuration we're using to bind the data recevied into.
// A copy of the configuration we're using to bind the data received into.
cfg := *config.Get()
// BindJSON sends 400 if the request fails, all we need to do is return

View File

@@ -147,11 +147,11 @@ func postTransfer(c *gin.Context) {
return
}
l.WithField("error", errors.WithStack(rerr)).Error("recieved error response from panel while notifying of transfer failure")
l.WithField("error", errors.WithStack(rerr)).Error("received error response from panel while notifying of transfer failure")
return
}
l.Debug("notified panel of tranfer failure")
l.Debug("notified panel of transfer failure")
}()
// Make a new GET request to the URL the panel gave us.

View File

@@ -16,7 +16,7 @@ type Message struct {
//
// - status : Returns the server's power state.
// - logs : Returns the server log data at the time of the request.
// - power : Performs a power action aganist the server based the data.
// - power : Performs a power action against the server based the data.
// - command : Performs a command on a server using the data field.
Event string `json:"event"`